CVEfocus › CVE database › CVE-2023-40587

CVE-2023-40587Pyramid static view path traversal up one directory

CVSS 4.3 MediumEPSS 0.8% (higher than 56% of CVEs)Published 2023-08-25Updated 2025-02-13Assigner: GitHub_M

Pyramid is an open source Python web framework. A path traversal vulnerability in Pyramid versions 2.0.0 and 2.0.1 impacts users of Python 3.11 that are using a Pyramid static view with a full filesystem path and have a `index.html` file that is located exactly one directory above the location of the static view's file system path. No further path traversal exists, and the only file that could be disclosed accidentally is `index.html`. Pyramid version 2.0.2 rejects any path that contains a null-byte out of caution. While valid in directory/file names, we would strongly consider it a mistake to use null-bytes in naming files/directories. Secondly, Python 3.11, and 3.12 has fixed the underlying issue in `os.path.normpath` to no longer truncate on the first `0x00` found, returning the behavior to pre-3.11 Python, un an as of yet unreleased version. Fixes will be available in:Python 3.12.0rc2 and 3.11.5. Some workarounds are available. Use a version of Python 3 that is not affected, downgrade to Python 3.10 series temporarily, or wait until Python 3.11.5 is released and upgrade to the latest version of Python 3.11 series.

CWE-22

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
1Fix pending
3Under investigation
5Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10python-pyramidFix pendingUBUNTU-CVE-2023-40587
Ubuntu 26.04python-pyramidUnder investigationUBUNTU-CVE-2023-40587
Ubuntu 25.10python-pyramidWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-40587
Ubuntu 24.04python-pyramidUnder investigationUBUNTU-CVE-2023-40587
Ubuntu 22.04python-pyramidUnder investigationUBUNTU-CVE-2023-40587
Ubuntu 20.04python-pyramidWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-40587
Ubuntu 18.04python-pyramidWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-40587
Ubuntu 16.04python-pyramidWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-40587
Ubuntu 14.04python-pyramidWill not fix
Ubuntu decided not to fix this in this release
Debian 14python-pyramidFixed2.0.2+dfsg-1DEBIAN-CVE-2023-40587
Debian 13python-pyramidFixed2.0.2+dfsg-1DEBIAN-CVE-2023-40587
Debian 12python-pyramidFixed2.0+dfsg-2+deb12u1DEBIAN-CVE-2023-40587
PyPI librarypyramidFixed2.0.2PYSEC-2026-1840

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.