{"answers":{"affected":"2 open source packages ship an affected version, including psf/black and black. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-31900 in the wild and no public exploit code.","fix":"Upgrade psf/black to 26.3.0 or later.","what":"CVE-2026-31900 is a high-severity code injection vulnerability in psf black, published on 11 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-31900 and fix it if it is affected.\n\nWhat it is: CVE-2026-31900 is a high-severity code injection vulnerability in psf black, published on 11 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-31900 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- psf/black (GitHub Actions): affected all versions; fixed in 26.3.0\n- black (PyPI): affected all versions; fixed in 26.3.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-31900/ (Markdown: https://insights.sbomify.com/CVE-2026-31900/index.md)","id":"CVE-2026-31900","markdown":"https://insights.sbomify.com/CVE-2026-31900/index.md","name":"CVE-2026-31900","record":{"aliases":["CLEANSTART-2026-DV70312","DEBIAN-CVE-2026-31900","GHSA-v53h-f6m7-xcgm","PYSEC-2026-2120","UBUNTU-CVE-2026-31900"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Python code formatter","requires_auth":"low_privilege","summary":"Attackers can achieve arbitrary code execution in GitHub Actions by manipulating pyproject.toml when the use_pyproject option is enabled.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"black","vendor":"python"}],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"description":"Black is the uncompromising Python code formatter. Black provides a GitHub action for formatting code. This action supports an option, use_pyproject: true, for reading the version of Black to use from the repository pyproject.toml. A malicious pull request could edit pyproject.toml to use a direct URL reference to a malicious repository. This could lead to arbitrary code execution in the context of the GitHub Action. Attackers could then gain access to secrets or permissions available in the context of the action. Version 26.3.0 fixes this vulnerability.","ecosystems":["GitHub Actions","PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-04-11","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-04-11T11:17:07Z","kind":"github_poc","ref":"https://github.com/Batosay1337Lab/cve-2026-31900-lab","stars":1,"title":"CVE-2026-31900 Vulnerable Lab - psf/black GitHub Action RCE"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Black's vulnerable version parsing leads to RCE in GitHub Action","id":"CVE-2026-31900","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"GitHub Actions","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":2,"n_references":2,"next":{"headline":"Parse Server has user enumeration via email verification endpoint","id":"CVE-2026-31901"},"packages":[{"ecosystem":"GitHub Actions","fixed":["26.3.0"],"introduced":["0"],"last_affected":[],"package":"psf/black","purl":null,"source":"GHSA-v53h-f6m7-xcgm"},{"ecosystem":"PyPI","fixed":["26.3.0"],"introduced":["0"],"last_affected":[],"package":"black","purl":"pkg:pypi/black","source":"PYSEC-2026-2120"}],"prev":{"headline":"CairoSVG vulnerable to Exponential DoS via recursive \u003cuse\u003e element amplification","id":"CVE-2026-31899"},"products":["black"],"published":"2026-03-11","related":[{"cvss_score":8.7,"headline":"Black: Arbitrary file writes from unsanitized user input in cache file name","id":"CVE-2026-32274","kev_date_added":null,"published":"2026-03-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-03-13","vendors":["psf"]},"summary":"Attackers can achieve arbitrary code execution in GitHub Actions by manipulating pyproject.toml when the use_pyproject option is enabled.","url":"https://insights.sbomify.com/CVE-2026-31900/"}