5.3
MEDIUM
CVE-2023-40587
Pyramid Null Byte Path Traversal Vulnerability
Description

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.

INFO

Published Date :

Aug. 25, 2023, 9:15 p.m.

Last Modified :

Feb. 16, 2024, 6:43 p.m.

Remotely Exploitable :

Yes !

Impact Score :

1.4

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2023-40587 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Agendaless pyramid

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-40587 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-40587 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Modified Analysis by [email protected]

    Feb. 16, 2024

    Action Type Old Value New Value
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/ Mailing List
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/ Mailing List
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Sep. 15, 2023

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/ [No Types Assigned]
  • CVE Modified by [email protected]

    Sep. 05, 2023

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Aug. 31, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    Changed Reference Type https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85 No Types Assigned https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85 Patch
    Changed Reference Type https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8 No Types Assigned https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8 Patch, Vendor Advisory
    Changed Reference Type https://github.com/python/cpython/issues/106242 No Types Assigned https://github.com/python/cpython/issues/106242 Issue Tracking, Third Party Advisory
    Changed Reference Type https://github.com/python/cpython/pull/106816 No Types Assigned https://github.com/python/cpython/pull/106816 Patch
    Added CWE NIST CWE-22
    Added CPE Configuration OR *cpe:2.3:a:agendaless:pyramid:*:*:*:*:*:python:*:* versions from (including) 2.0 up to (excluding) 2.0.2
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-40587 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.09 }} 0.02%

score

0.39702

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability