{"id":"CVE-2024-12254","aliases":["CVE-2024-12254","PSF-2024-14","BIT-LIBPYTHON-2024-12254","BIT-PYTHON-2024-12254","BIT-PYTHON-MIN-2024-12254"],"related":[],"kind":"vulnerability","state":"published","title":"Unbounded memory buffering in SelectorSocketTransport.writelines()","summary":"Starting in Python 3.12.0, the asyncio._SelectorSocketTransport.writelines()\n method would not \"pause\" writing and signal to the Protocol to drain \nthe buffer to the wire once the write buffer reached the \"high-water \nmark\". Because of this, Protocols would not periodically drain the write\n buffer potentially leading to memory exhaustion.\n\n\n\n\n\nThis\n vulnerability likely impacts a small number of users, you must be using\n Python 3.12.0 or later, on macOS or Linux, using the asyncio module \nwith protocols, and using .writelines() method which had new \nzero-copy-on-write behavior in Python 3.12.0 and later. If not all of \nthese factors are true then your usage of Python is unaffected.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Starting in Python 3.12.0, the asyncio._SelectorSocketTransport.writelines()\n method would not \"pause\" writing and signal to the Protocol to drain \nthe buffer to the wire once the write buffer reached the \"high-water \nmark\". Because of this, Protocols would not periodically drain the write\n buffer potentially leading to memory exhaustion.\n\n\n\n\n\nThis\n vulnerability likely impacts a small number of users, you must be using\n Python 3.12.0 or later, on macOS or Linux, using the asyncio module \nwith protocols, and using .writelines() method which had new \nzero-copy-on-write behavior in Python 3.12.0 and later. If not all of \nthese factors are true then your usage of Python is unaffected.","source":"cvelist"},{"lang":"es","text":"Starting de Python 3.12.0, el método asyncio._SelectorSocketTransport.writelines() no \"pausaba\" la escritura ni enviaba señales al protocolo para que vaciara el búfer hacia el cable una vez que el búfer de escritura alcanzaba el \"límite superior\". Debido a esto, los protocolos no vaciaban periódicamente el búfer de escritura, lo que podría provocar el agotamiento de la memoria. Es probable que esta vulnerabilidad afecte a una pequeña cantidad de usuarios. Debes usar Python 3.12.0 o posterior, en macOS o Linux, usar el módulo asyncio con protocolos y usar el método .writelines(), que tenía un nuevo comportamiento de copia cero al escribir en Python 3.12.0 y posterior. Si no se cumplen todos estos factores, tu uso de Python no se ve afectado.","source":"nvd"}],"published":"2024-12-06T15:19:41.576Z","modified":"2026-07-31T15:16:26.553Z","severity":{"scorer":"PSF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"PSF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"type":"python","introduced":"0","fixed":"3.12.9","status":"affected"},{"type":"python","introduced":"3.13.0","fixed":"3.13.2","status":"affected"},{"type":"python","introduced":"3.14.0a1","fixed":"3.14.0a3","status":"affected"}],"vendor":"Python Software Foundation","product":"CPython","repo":"https://github.com/python/cpython","platforms":["MacOS","Linux"],"source":"cvelist"},{"ranges":[{"type":"python","introduced":"3.12.0","fixed":"3.14.0a1","status":"affected"}],"vendor":"python_software_foundation","product":"cpython","cpe":"cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"71e8429ac8e2adc10084ab5ec29a62f4b6671a82"},{"type":"git","status":"affected","fixed":"9aa0deb2eef2655a1029ba228527b152353135b5"},{"type":"git","status":"affected","fixed":"e991ac8f2037d78140e417cc9a9486223eb3e786"}],"repo":"https://github.com/python/cpython","source":"psf"},{"ranges":[{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.9"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.2"}],"ecosystem":"Bitnami","package":"libpython","purl":"pkg:bitnami/libpython","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.9"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.2"}],"ecosystem":"Bitnami","package":"python","purl":"pkg:bitnami/python","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.9"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.2"}],"ecosystem":"Bitnami","package":"python-min","purl":"pkg:bitnami/python-min","source":"bitnami"}],"references":[{"url":"https://github.com/python/cpython/issues/127655","tags":["issue-tracking","report","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/pull/127656","tags":["patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/","tags":["advisory","vendor-advisory","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/71e8429ac8e2adc10084ab5ec29a62f4b6671a82","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2024/12/06/1","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20250404-0010/","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-12254","tags":["web"],"sources":["bitnami"]}],"credits":["J. Nick Koston","Seth Larson"],"assigner":"PSF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-12-06T15:35:11.234Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-12254","url":"https://www.cve.org/CVERecord?id=CVE-2024-12254","licence":"CVE Terms of Use","modified":"2026-07-31T14:08:25.397Z"},{"source":"psf","name":"Python Software Foundation","id":"PSF-2024-14","url":"https://osv.dev/vulnerability/PSF-2024-14","licence":"CC-BY-4.0","modified":"2025-10-09T01:04:28.501Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-12254","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-12254","licence":"Public domain","modified":"2026-07-31T15:16:26.553Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-LIBPYTHON-2024-12254","url":"https://osv.dev/vulnerability/BIT-LIBPYTHON-2024-12254","licence":"Apache-2.0","modified":"2025-08-11T15:13:34.080Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-2024-12254","url":"https://osv.dev/vulnerability/BIT-PYTHON-2024-12254","licence":"Apache-2.0","modified":"2025-08-11T15:13:34.080Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-MIN-2024-12254","url":"https://osv.dev/vulnerability/BIT-PYTHON-MIN-2024-12254","licence":"Apache-2.0","modified":"2025-08-11T15:13:34.080Z"}],"updatedAt":"2026-11-25T22:58:49.789Z","epss":{"score":0.01868,"percentile":0.79932,"date":"2026-12-01T12:00:22.000Z"}}