Home / Pylons / pyramid / CVE-2023-40587
CVE-2023-40587: is it exploited, and which versions of Pylons pyramid are affected and fixed?
CVE-2023-40587 is a path traversal (reading or writing files outside the intended folder) vulnerability in Pylons pyramid. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:38 UTC). Affected: pyramid from 2.0.0 before 2.0.2 (GitHub advisory GHSA-j8g2-6fc7-q8f8). Fixed in 2.0.2 (GitHub advisory GHSA-j8g2-6fc7-q8f8). Severity: Medium (4.3, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:38 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:36 UTC.
What is CVE-2023-40587?
Pyramid static view path traversal up one directory
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.
From the CVE record by GitHub_M, last updated February 13, 2025, 17:08 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Pylons | pyramid | >= 2.0.0, < 2.0.2 |
As the CVE record by GitHub_M states it, last updated February 13, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | pyramid | >= 2.0.0, < 2.0.2 | 2.0.2 | GHSA-j8g2-6fc7-q8f8 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated February 16, 2024. Summary: Pyramid static view path traversal up one directory.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| agendaless | pyramid | from 2.0 before 2.0.2 | application |
| fedoraproject | fedora | 38 | operating system |
| fedoraproject | fedora | 39 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 06:18 UTC.
How severe is CVE-2023-40587?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 4.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N | GitHub_M |
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2023-40587 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 0.75% probability of exploitation activity in the next 30 days, percentile 56.3 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Where are the vendor advisories and references?
- https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8 x_refsource_CONFIRM
- https://github.com/python/cpython/issues/106242 x_refsource_MISC
- https://github.com/python/cpython/pull/106816 x_refsource_MISC
- https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85 x_refsource_MISC
- https://lists.fedoraproject.org/archives/list/[email protected]/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/
When was it published, and where is the official record?
- Reserved
- August 16, 2023
- Published
- August 25, 2023, 20:46 UTC
- CVE record updated
- February 13, 2025, 17:08 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 06:18 UTC
- Last checked
- CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:36 UTC; KEV December 3, 2026, 10:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
Questions about CVE-2023-40587
Is CVE-2023-40587 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:38 UTC. FIRST's EPSS gives it a 0.75% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Pylons pyramid are affected by CVE-2023-40587?
pyramid from 2.0.0 before 2.0.2, per the GitHub advisory GHSA-j8g2-6fc7-q8f8. The tables above give every range the sources list.
Which version fixes CVE-2023-40587?
2.0.2, per the GitHub advisory GHSA-j8g2-6fc7-q8f8. Check the vendor's advisory before you rely on it.
How severe is CVE-2023-40587?
Medium (4.3, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2023-40587?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.