CVE-2023-40587
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.
Leer descripción completaMostrar menos
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.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Puntuación base: 5.3
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.75%
- Percentil entre todas las CVEs puntuadas: 54
- Fecha de la puntuación: 6/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (2)
CWE
- CWE-22
- CWE-22
Referencias
- https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85
- https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8
- https://github.com/python/cpython/issues/106242
- https://github.com/python/cpython/pull/106816
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/
- https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85
- https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8
- https://github.com/python/cpython/issues/106242
- https://github.com/python/cpython/pull/106816
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-40587",
"cveTags": [],
"metrics": {
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N",
"integrityImpact": "NONE",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
},
"impactScore": 1.4,
"exploitabilityScore": 2.8
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
},
"impactScore": 1.4,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security-advisories@github.com",
"affectedData": [
{
"vendor": "Pylons",
"product": "pyramid",
"versions": [
{
"status": "affected",
"version": ">= 2.0.0, < 2.0.2"
}
]
}
]
}
],
"published": "2023-08-25T21:15:09.290",
"references": [
{
"url": "https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8",
"tags": [
"Patch",
"Vendor Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/python/cpython/issues/106242",
"tags": [
"Issue Tracking",
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/python/cpython/pull/106816",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/",
"tags": [
"Mailing List"
],
"source": "security-advisories@github.com"
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/",
"tags": [
"Mailing List"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/Pylons/pyramid/commit/347d7750da6f45c7436dd0c31468885cc9343c85",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/Pylons/pyramid/security/advisories/GHSA-j8g2-6fc7-q8f8",
"tags": [
"Patch",
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/python/cpython/issues/106242",
"tags": [
"Issue Tracking",
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/python/cpython/pull/106816",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYSDTQ7NP5GHPQ7HBE47MBJQK7YEIYMF/",
"tags": [
"Mailing List"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQIPHQTM3XE5NIEXCTQFV2J2RK2YUSMT/",
"tags": [
"Mailing List"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-22"
}
]
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-22"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "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."
}
],
"lastModified": "2026-06-17T06:18:36.007",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:agendaless:pyramid:*:*:*:*:*:python:*:*",
"vulnerable": true,
"matchCriteriaId": "7EDA3AB1-2B0D-463F-874E-F617ECD0A7F7",
"versionEndExcluding": "2.0.2",
"versionStartIncluding": "2.0"
}
],
"operator": "OR"
}
]
},
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "CC559B26-5DFC-4B7A-A27C-B77DE755DFF9"
},
{
"criteria": "cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "B8EDB836-4E6A-4B71-B9B2-AA3E03E0F646"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}