CVE catalog

CVE-2026-12345

The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of

[CVE catalog]

Severity
Medium · CVSS 6.3CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.18% · Oct 22, 2026

The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpypy3sid8.0.1+dfsg-1vulnerable
Debianpypy3forky8.0.1+dfsg-1vulnerable
Debianpypy3trixie7.3.19+dfsg-2vulnerable
Debianpypy3bookworm7.3.11+dfsg-2+deb12u3vulnerable
Debianpython3.11bookworm3.11.2-6+deb12u8vulnerable
Debianpython3.11bookworm-security3.11.2-6+deb12u9vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpypy3sourcesid(unfixed)not yet assignedNot reported[1150804]
Debianpypy3sourceforky(unfixed)not yet assignedNot reported[1150804]
Debianpypy3sourcetrixie(unfixed)not yet assignedNot reported[1150804]
Debianpypy3sourcebookworm(unfixed)not yet assignedNot reported[1150804]
Debianpython3.11sourcebookworm(unfixed)not yet assignedNot reportedNot reported

[Debian bug #1150804]

Notes

[trixie] pypy3: Minor issue [bookworm] pypy3: Minor issue [bookworm] python3.11: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [idle-python3.11]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [libpython3.11]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [pypy3]Affected
    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · amd64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · arm64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [pypy3-dev]Affected

    Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [pypy3-doc]Affected

    Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [pypy3-lib]Affected

    Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · amd64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · arm64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [pypy3-tk]Affected

    Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · amd64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · arm64 · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [pypy3-venv]Affected

    Source package: [pypy3]

    Details (2)
    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

    • 7.3.11+dfsg-2+deb12u3 · all · bookworm

      Affected

      nvd · pypy3 · debian · bookworm

  • [python3.11]Affected
    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [python3.11-dbg]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [python3.11-dev]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [python3.11-doc]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · all · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · all · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

  • [python3.11-full]Affected

    Source package: [python3.11]

    Details (4)
    • 3.11.2-6+deb12u8 · amd64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u8 · arm64 · bookworm

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · amd64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

    • 3.11.2-6+deb12u3 · arm64 · bookworm-security

      Affected

      nvd · python3.11 · debian · bookworm

Next results

Observed:

References