{"answers":{"affected":"3 open source packages ship an affected version, including black. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-32274 in the wild and no public exploit code.","fix":"Upgrade black to 26.3.1 or later.","what":"CVE-2026-32274 is a high-severity path traversal vulnerability in psf black, published on 12 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-32274 and fix it if it is affected.\n\nWhat it is: CVE-2026-32274 is a high-severity path traversal vulnerability in psf black, published on 12 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-32274 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- black (PyPI): affected all versions; fixed in 26.3.1\n- black (PyPI): affected from 24.3.0; fixed in 26.3.1\n- black (PyPI): affected from 24.3.0; fixed in 26.3.1\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-32274/ (Markdown: https://insights.sbomify.com/CVE-2026-32274/index.md)","id":"CVE-2026-32274","markdown":"https://insights.sbomify.com/CVE-2026-32274/index.md","name":"CVE-2026-32274","record":{"aliases":["CLEANSTART-2026-XE98234","DEBIAN-CVE-2026-32274","ECHO-c5b6-7968-60af","GHSA-3936-cmfr-pm3m","MINI-rphp-3qhx-5x4v","OESA-2026-4064","PYSEC-2026-2121","ROOT-APP-PYPI-CVE-2026-32274","SUSE-SU-2026:0900-1","UBUNTU-CVE-2026-32274","openSUSE-SU-2026:11856-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Python code formatter","requires_auth":"none","summary":"An attacker controlling the --python-cell-magics argument can write cache files to arbitrary locations due to unsanitized input in the filename.","user_interaction":"not_required","vuln_class":"path_traversal"},"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:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Black is the uncompromising Python code formatter. Starting in version 24.3.0 and prior to version 26.3.1, Black writes a cache file, the name of which is computed from various formatting options. The value of the --python-cell-magics option was placed in the filename without sanitization, which allowed an attacker who controls the value of this argument to write cache files to arbitrary file system locations. Fixed in Black 26.3.1.","ecosystems":["PyPI","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Black: Arbitrary file writes from unsanitized user input in cache file name","id":"CVE-2026-32274","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":5,"n_references":13,"next":{"headline":"Tautulli: Unsanitized JSONP callback parameter allows cross-origin script injection and API key theft","id":"CVE-2026-32275"},"packages":[{"ecosystem":"PyPI","fixed":["26.3.1"],"introduced":["0"],"last_affected":[],"package":"black","purl":"pkg:pypi/black","source":"PYSEC-2026-2121"},{"ecosystem":"PyPI","fixed":["26.3.1"],"introduced":["24.3.0"],"last_affected":[],"package":"black","purl":null,"source":"GHSA-3936-cmfr-pm3m"},{"ecosystem":"PyPI","fixed":["26.3.1"],"introduced":["24.3.0"],"last_affected":[],"package":"black","purl":"pkg:pypi/black","source":"GHSA-3936-cmfr-pm3m"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["24.3.0-150400.9.11.1"],"introduced":["0"],"last_affected":[],"package":"python-black","purl":"pkg:rpm/opensuse/python-black\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2026:0900-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["26.9.0-1.1"],"introduced":["0"],"last_affected":[],"package":"ansible-lint","purl":"pkg:rpm/opensuse/ansible-lint\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11856-1"}],"prev":{"headline":"Discourse: XSS on category description update via API","id":"CVE-2026-32273"},"products":["black"],"published":"2026-03-12","related":[{"cvss_score":8.7,"headline":"Black's vulnerable version parsing leads to RCE in GitHub Action","id":"CVE-2026-31900","kev_date_added":null,"published":"2026-03-11"}],"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":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-08-03","vendors":["psf"]},"summary":"An attacker controlling the --python-cell-magics argument can write cache files to arbitrary locations due to unsanitized input in the filename.","url":"https://insights.sbomify.com/CVE-2026-32274/"}