// For flags

CVE-2023-40587

Pyramid static view path traversal up one directory

Severity Score

5.3
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Pyramid es un framework web de Python de código abierto. Una vulnerabilidad de Path Traversal en las versiones 2.0.0 y 2.0.1 de Pyramid afecta a los usuarios de Python 3.11 que utilizan una vista estática de Pyramid con una ruta completa del sistema de archivos y tienen un archivo `index.html` que se encuentra exactamente un directorio encima de la ubicación de la ruta del sistema de archivos de la vista estática. No existe ningún otro Path Traversal y el único archivo que podría revelarse accidentalmente es `index.html`. La versión 2.0.2 de Pyramid rechaza cualquier ruta que contenga un byte nulo por precaución. Si bien es válido en nombres de directorios/archivos, consideraríamos un error utilizar bytes nulos al nombrar archivos/directorios. En segundo lugar, Python 3.11 y 3.12 han solucionado el problema subyacente en `os.path.normpath` para que ya no se trunque en el primer `0x00` encontrado, devolviendo el comportamiento a Python anterior a 3.11, una versión aún no publicada. Las correcciones estarán disponibles en: Python 3.12.0rc2 y 3.11.5. Algunos workarounds están disponibles. Utilice una versión de Python 3 que no se vea afectada, cambie temporalmente a la serie Python 3.10 o espere hasta que se lance Python 3.11.5 y actualice a la última versión de la serie Python 3.11.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-08-16 CVE Reserved
  • 2023-08-25 CVE Published
  • 2024-08-02 CVE Updated
  • 2024-09-26 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Agendaless
Search vendor "Agendaless"
Pyramid
Search vendor "Agendaless" for product "Pyramid"
>= 2.0 < 2.0.2
Search vendor "Agendaless" for product "Pyramid" and version " >= 2.0 < 2.0.2"
python
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
38
Search vendor "Fedoraproject" for product "Fedora" and version "38"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
39
Search vendor "Fedoraproject" for product "Fedora" and version "39"
-
Affected