CVE-2023-6507
An issue was found in CPython 3.12.0 `subprocess` module on POSIX platforms. The issue was fixed in CPython 3.12.1 and does not affect other stable releases.
When using the `extra_groups=` parameter with an empty list as a value (ie `extra_groups=[]`) the logic regressed to not call `setgroups(0, NULL)` before calling `exec()`, thus not dropping the original processes' groups before starting the new process. There is no issue when the parameter isn't used or when any value is used besides an empty list.
This issue only impacts CPython processes run with sufficient privilege to make the `setgroups` system call (typically `root`).
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
- Puntuación base: 4.9
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 1.34%
- Percentil entre todas las CVEs puntuadas: 70
- 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 (1)
CWE
- CWE-269
- NVD-CWE-noinfo
Referencias
- https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b
- https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06
- https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610
- https://github.com/python/cpython/issues/112334
- https://mail.python.org/archives/list/security-announce@python.org/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/
- https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b
- https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06
- https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610
- https://github.com/python/cpython/issues/112334
- https://mail.python.org/archives/list/security-announce@python.org/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-6507",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-6507",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2024-01-31T20:16:20.207522Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "cna@python.org",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 6.1,
"attackVector": "ADJACENT_NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "HIGH",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.2,
"exploitabilityScore": 0.9
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.9,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "HIGH",
"confidentialityImpact": "NONE"
},
"impactScore": 3.6,
"exploitabilityScore": 1.2
}
]
},
"affected": [
{
"source": "cna@python.org",
"affectedData": [
{
"repo": "https://github.com/python/cpython",
"vendor": "Python Software Foundation",
"product": "CPython",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "3.12.1",
"versionType": "python"
},
{
"status": "affected",
"version": "3.13.0a1",
"lessThan": "3.13.0a3",
"versionType": "python"
}
],
"platforms": [
"POSIX"
],
"defaultStatus": "unaffected"
}
]
},
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"affectedData": [
{
"cpes": [
"cpe:2.3:a:python:cpython:3.13.0:*:*:*:*:*:*:*"
],
"vendor": "python",
"product": "cpython",
"versions": [
{
"status": "affected",
"version": "3.13.0"
}
],
"defaultStatus": "unknown"
},
{
"cpes": [
"cpe:2.3:a:python:cpython:*:*:*:*:*:*:*:*"
],
"vendor": "python",
"product": "cpython",
"versions": [
{
"status": "affected",
"version": "3.12.0"
}
],
"defaultStatus": "unknown"
}
]
}
],
"published": "2023-12-08T19:15:08.440",
"references": [
{
"url": "https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b",
"source": "cna@python.org"
},
{
"url": "https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06",
"source": "cna@python.org"
},
{
"url": "https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610",
"source": "cna@python.org"
},
{
"url": "https://github.com/python/cpython/issues/112334",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "cna@python.org"
},
{
"url": "https://mail.python.org/archives/list/security-announce@python.org/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/",
"tags": [
"Third Party Advisory"
],
"source": "cna@python.org"
},
{
"url": "https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/python/cpython/issues/112334",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://mail.python.org/archives/list/security-announce@python.org/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "cna@python.org",
"description": [
{
"lang": "en",
"value": "CWE-269"
}
]
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "NVD-CWE-noinfo"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "An issue was found in CPython 3.12.0 `subprocess` module on POSIX platforms. The issue was fixed in CPython 3.12.1 and does not affect other stable releases.\n\nWhen using the `extra_groups=` parameter with an empty list as a value (ie `extra_groups=[]`) the logic regressed to not call `setgroups(0, NULL)` before calling `exec()`, thus not dropping the original processes' groups before starting the new process. There is no issue when the parameter isn't used or when any value is used besides an empty list.\n\nThis issue only impacts CPython processes run with sufficient privilege to make the `setgroups` system call (typically `root`)."
},
{
"lang": "es",
"value": "Se encontró un problema en el módulo `subproceso` de CPython 3.12.0 en plataformas POSIX. El problema se solucionó en CPython 3.12.1 y no afecta a otras versiones estables. Cuando se utiliza el parámetro `extra_groups=` con una lista vacía como valor (es decir, `extra_groups=[]`), la lógica retrocede para no llamar a `setgroups(0, NULL)` antes de llamar a `exec()`, por lo que no se descarta el grupos de procesos originales antes de iniciar el nuevo proceso. No hay ningún problema cuando no se usa el parámetro o cuando se usa cualquier valor además de una lista vacía. Este problema solo afecta los procesos de CPython que se ejecutan con privilegios suficientes para realizar la llamada al sistema \"setgroups\" (normalmente \"root\")."
}
],
"lastModified": "2026-07-31T15:16:26.330",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:python:python:3.12.0:-:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "5C76EDC2-43FF-448B-B65C-20AC83D680FE"
},
{
"criteria": "cpe:2.3:a:python:python:3.13.0:alpha1:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "978582FF-B8F3-479F-AE77-359E9AEE6F23"
},
{
"criteria": "cpe:2.3:a:python:python:3.13.0:alpha2:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "84E3F62C-7218-4DC3-8473-8A576739643A"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "cna@python.org"
}