185 lines
7.7 KiB
JSON
Raw Normal View History

{
"id": "CVE-2023-45805",
"sourceIdentifier": "security-advisories@github.com",
"published": "2023-10-20T19:15:08.820",
"lastModified": "2024-11-21T08:27:23.383",
"vulnStatus": "Modified",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "pdm is a Python package and dependency manager supporting the latest PEP standards. It's possible to craft a malicious `pdm.lock` file that could allow e.g. an insider or a malicious open source project to appear to depend on a trusted PyPI project, but actually install another project. A project `foo` can be targeted by creating the project `foo-2` and uploading the file `foo-2-2.tar.gz` to pypi.org. PyPI will see this as project `foo-2` version `2`, while PDM will see this as project `foo` version `2-2`. The version must only be `parseable as a version` and the filename must be a prefix of the project name, but it's not verified to match the version being installed. Version `2-2` is also not a valid normalized version per PEP 440. Matching the project name exactly (not just prefix) would fix the issue. When installing dependencies with PDM, what's actually installed could differ from what's listed in `pyproject.toml` (including arbitrary code execution on install). It could also be used for downgrade attacks by only changing the version. This issue has been addressed in commit `6853e2642df` which is included in release version `2.9.4`. Users are advised to upgrade. There are no known workarounds for this vulnerability."
},
{
"lang": "es",
"value": "pdm es un administrador de dependencias y paquetes de Python que admite los \u00faltimos est\u00e1ndares PEP. Es posible crear un archivo `pdm.lock` malicioso que podr\u00eda permitir, por ejemplo, que un proyecto interno o de c\u00f3digo abierto malicioso parezca depender de un proyecto PyPI confiable, pero en realidad instale otro proyecto. Se puede apuntar a un proyecto `foo` creando el proyecto `foo-2` y cargando el archivo `foo-2-2.tar.gz` en pypi.org. PyPI ver\u00e1 esto como proyecto `foo-2` versi\u00f3n `2`, mientras que PDM ver\u00e1 esto como proyecto `foo` versi\u00f3n `2-2`. La versi\u00f3n solo debe ser \"analizable como versi\u00f3n\" y el nombre del archivo debe ser un prefijo del nombre del proyecto, pero no se verifica que coincida con la versi\u00f3n que se est\u00e1 instalando. La versi\u00f3n `2-2` tampoco es una versi\u00f3n normalizada v\u00e1lida seg\u00fan PEP 440. Hacer coincidir exactamente el nombre del proyecto (no solo el prefijo) solucionar\u00eda el problema. Al instalar dependencias con PDM, lo que realmente se instala puede diferir de lo que aparece en `pyproject.toml` (incluida la ejecuci\u00f3n de c\u00f3digo arbitrario durante la instalaci\u00f3n). Tambi\u00e9n podr\u00eda usarse para ataques de degradaci\u00f3n cambiando solo la versi\u00f3n. Este problema se solucion\u00f3 en el commit `6853e2642df` que se incluye en la versi\u00f3n `2.9.4`. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad."
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "security-advisories@github.com",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"baseScore": 7.8,
"baseSeverity": "HIGH",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.8,
"impactScore": 5.9
},
{
"source": "nvd@nist.gov",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"baseScore": 7.8,
"baseSeverity": "HIGH",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.8,
"impactScore": 5.9
}
]
},
"weaknesses": [
{
"source": "security-advisories@github.com",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-20"
}
]
},
{
"source": "nvd@nist.gov",
"type": "Primary",
"description": [
{
"lang": "en",
"value": "NVD-CWE-noinfo"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:frostming:pdm:*:*:*:*:*:python:*:*",
"versionStartIncluding": "2.0.0",
"versionEndExcluding": "2.10.0",
"matchCriteriaId": "678C6891-163D-40EC-AA3F-F6C62650F55B"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:frostming:unearth:*:*:*:*:*:python:*:*",
"versionEndExcluding": "0.11.2",
"matchCriteriaId": "2D6377F2-F3DF-4E02-810F-11EF3C227B7E"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/frostming/unearth/blob/eca170d9370ac5032f2e497ee9b1b63823d3fe0f/src/unearth/evaluator.py#L215-L229",
"source": "security-advisories@github.com",
"tags": [
"Product"
]
},
{
"url": "https://github.com/pdm-project/pdm/blob/45d1dfa47d4900c14a31b9bb761e4c46eb5c9442/src/pdm/models/candidates.py#L98-L99",
"source": "security-advisories@github.com",
"tags": [
"Product"
]
},
{
"url": "https://github.com/pdm-project/pdm/commit/6853e2642dfa281d4a9958fbc6c95b7e32d84831",
"source": "security-advisories@github.com",
"tags": [
"Patch",
"Vendor Advisory"
]
},
{
"url": "https://github.com/pdm-project/pdm/security/advisories/GHSA-j44v-mmf2-xvm9",
"source": "security-advisories@github.com",
"tags": [
"Exploit",
"Vendor Advisory"
]
},
{
"url": "https://peps.python.org/pep-0440/#post-release-spelling",
"source": "security-advisories@github.com",
"tags": [
"Not Applicable"
]
},
{
"url": "https://github.com/frostming/unearth/blob/eca170d9370ac5032f2e497ee9b1b63823d3fe0f/src/unearth/evaluator.py#L215-L229",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Product"
]
},
{
"url": "https://github.com/pdm-project/pdm/blob/45d1dfa47d4900c14a31b9bb761e4c46eb5c9442/src/pdm/models/candidates.py#L98-L99",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Product"
]
},
{
"url": "https://github.com/pdm-project/pdm/commit/6853e2642dfa281d4a9958fbc6c95b7e32d84831",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Patch",
"Vendor Advisory"
]
},
{
"url": "https://github.com/pdm-project/pdm/security/advisories/GHSA-j44v-mmf2-xvm9",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Exploit",
"Vendor Advisory"
]
},
{
"url": "https://peps.python.org/pep-0440/#post-release-spelling",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Not Applicable"
]
}
]
}