{"id":"CVE-2026-32274","state":"PUBLISHED","title":"Black: Arbitrary file writes from unsanitized user input in cache file name","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.","publishedAt":"2026-03-12T19:47:07.464Z","updatedAt":"2026-08-03T20:36:42.572Z","severity":{"score":8.7,"label":"High","version":"4.0","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","source":"GitHub_M"},"assigner":"GitHub_M","products":["psf black"],"affected":[{"vendor":"psf","product":"black","versions":[{"version":">= 24.3.0, < 26.3.1","status":"affected"}]}],"references":["https://github.com/psf/black/security/advisories/GHSA-3936-cmfr-pm3m","https://github.com/psf/black/pull/4176","https://github.com/psf/black/pull/5038","https://github.com/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d","https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9","https://access.redhat.com/errata/RHSA-2026:10184","https://access.redhat.com/errata/RHSA-2026:13545","https://access.redhat.com/errata/RHSA-2026:13553","https://access.redhat.com/security/cve/CVE-2026-32274","https://bugzilla.redhat.com/show_bug.cgi?id=2447111","https://github.com/psf/black/releases/tag/26.3.1","https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/32xxx/CVE-2026-32274.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-32274","state":"PUBLISHED","datePublished":"2026-03-12T19:47:07.464Z","dateUpdated":"2026-08-03T20:36:42.572Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-11T15:05:48.400Z"},"containers":{"cna":{"title":"Black: Arbitrary file writes from unsanitized user input in cache file name","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"psf","product":"black","versions":[{"version":">= 24.3.0, < 26.3.1","status":"affected"}]}],"references":[{"url":"https://github.com/psf/black/security/advisories/GHSA-3936-cmfr-pm3m","name":"https://github.com/psf/black/security/advisories/GHSA-3936-cmfr-pm3m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/psf/black/pull/4176","name":"https://github.com/psf/black/pull/4176","tags":["x_refsource_MISC"]},{"url":"https://github.com/psf/black/pull/5038","name":"https://github.com/psf/black/pull/5038","tags":["x_refsource_MISC"]},{"url":"https://github.com/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d","name":"https://github.com/psf/black/commit/4937fe6cf241139ddbfc16b0bdbb5b422798909d","tags":["x_refsource_MISC"]},{"url":"https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9","name":"https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2026:10184","name":"https://access.redhat.com/errata/RHSA-2026:10184","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2026:13545","name":"https://access.redhat.com/errata/RHSA-2026:13545","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2026:13553","name":"https://access.redhat.com/errata/RHSA-2026:13553","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-32274","name":"https://access.redhat.com/security/cve/CVE-2026-32274","tags":["x_refsource_MISC"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2447111","name":"https://bugzilla.redhat.com/show_bug.cgi?id=2447111","tags":["x_refsource_MISC"]},{"url":"https://github.com/psf/black/releases/tag/26.3.1","name":"https://github.com/psf/black/releases/tag/26.3.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml","name":"https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2026-2121.yaml","tags":["x_refsource_MISC"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json","name":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.7,"baseSeverity":"HIGH","vectorString":"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-03T20:36:42.572Z"},"source":{"advisory":"GHSA-3936-cmfr-pm3m","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-13T16:10:43.937677Z","id":"CVE-2026-32274","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-13T16:10:51.448Z"}},{"title":"black: Black: Arbitrary file writes from unsanitized user input in cache file name","descriptions":[{"lang":"en","value":"A user input sanitization flaw has been discovered in the Black python code formatter. 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."}],"affected":[{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.5","packageName":"ansible-automation-platform-25/hub-rhel8","defaultStatus":"affected","versions":[{"version":"1777393635","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.5::el8"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.5","packageName":"ansible-automation-platform-25/lightspeed-rhel8","defaultStatus":"affected","versions":[{"version":"1777403872","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.5::el8"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","packageName":"ansible-automation-platform-26/ansible-dev-tools-rhel9","defaultStatus":"affected","versions":[{"version":"1777390240","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.6::el9"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","packageName":"ansible-automation-platform-26/ee-minimal-rhel9","defaultStatus":"affected","versions":[{"version":"1777387537","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.6::el9"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","packageName":"ansible-automation-platform-26/hub-rhel9","defaultStatus":"affected","versions":[{"version":"1777299023","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.6::el9"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","packageName":"ansible-automation-platform-26/lightspeed-rhel9","defaultStatus":"affected","versions":[{"version":"1777387242","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.6::el9"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","packageName":"ansible-automation-platform-26/platform-resource-runner-rhel9","defaultStatus":"affected","versions":[{"version":"1777390333","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.6::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776319193","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776319179","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776319185","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776318795","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776319453","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776336534","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 2.25","packageName":"rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9","defaultStatus":"affected","versions":[{"version":"1776319275","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:2.25::el9"]},{"vendor":"Red Hat","product":"OpenShift Lightspeed","packageName":"openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_lightspeed"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","packageName":"ansible-automation-platform-26/ee-supported-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_automation_platform:2"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform Ansible Core 2","packageName":"ansible-automation-platform/ee-minimal-rhel8","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_core:2"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform Ansible Core 2","packageName":"ansible-automation-platform/ee-minimal-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_core:2"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform Ansible Core 2","packageName":"ansible-automation-platform-tech-preview/ee-minimal-rhel8","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_core:2"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform Ansible Core 2","packageName":"ansible-automation-platform-tech-preview/ee-minimal-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_core:2"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-kserve-agent-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-kserve-controller-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-kserve-router-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-kserve-storage-initializer-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-mlflow-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-model-registry-rhel8","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-training-operator-rhel8","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]},{"vendor":"Red Hat","product":"Red Hat OpenShift Virtualization 4","packageName":"container-native-virtualization/vm-network-latency-checkup-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:container_native_virtualization:4"]}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-32274","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2447111","name":"RHBZ#2447111","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32274.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:13553","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:13545","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:10184","tags":["vendor-advisory","x_refsource_REDHAT"]}],"metrics":[{"other":{"content":{"namespace":"https://access.redhat.com/security/updates/classification/","value":"Important"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","description":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-SADP","orgId":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c","dateUpdated":"2026-07-15T01:08:22.759Z"},"datePublic":"2026-03-12T19:47:07.464Z","solutions":[{"lang":"en","value":"RHSA-2026:13553: Red Hat Ansible Automation Platform 2.5"},{"lang":"en","value":"RHSA-2026:13545: Red Hat Ansible Automation Platform 2.6"},{"lang":"en","value":"RHSA-2026:10184: Red Hat OpenShift AI 2.25"}],"timeline":[{"lang":"en","time":"2026-03-12T20:01:22.957Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-03-12T19:47:07.464Z","value":"Made public."}],"workarounds":[{"lang":"en","value":"Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability."}],"x_adpType":"supplier","x_generator":{"engine":"sadp-cli 1.0.0"}}]}}}