{"id":"CVE-2024-12254","state":"PUBLISHED","title":"Unbounded memory buffering in SelectorSocketTransport.writelines()","description":"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.","publishedAt":"2024-12-06T15:19:41.576Z","updatedAt":"2026-07-31T14:08:25.397Z","severity":{"score":8.7,"label":"High","version":"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","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.12.9","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.2","versionType":"python"},{"version":"3.14.0a1","status":"affected","lessThan":"3.14.0a3","versionType":"python"}],"modules":["asyncio"],"platforms":["MacOS","Linux"],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/issues/127655","https://github.com/python/cpython/pull/127656","https://mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/","https://github.com/python/cpython/commit/71e8429ac8e2adc10084ab5ec29a62f4b6671a82","https://github.com/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5","https://github.com/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786","http://www.openwall.com/lists/oss-security/2024/12/06/1","https://security.netapp.com/advisory/ntap-20250404-0010/"],"weaknesses":["CWE-400","CWE-770"],"ingestedAt":"2026-10-29T20:06:50.777Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/12xxx/CVE-2024-12254.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-12254","state":"PUBLISHED","datePublished":"2024-12-06T15:19:41.576Z","dateUpdated":"2026-07-31T14:08:25.397Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2024-12-05T16:17:55.154Z"},"containers":{"cna":{"title":"Unbounded memory buffering in SelectorSocketTransport.writelines()","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.12.9","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.2","versionType":"python"},{"version":"3.14.0a1","status":"affected","lessThan":"3.14.0a3","versionType":"python"}],"modules":["asyncio"],"platforms":["MacOS","Linux"],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/issues/127655","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/pull/127656","tags":["patch"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/71e8429ac8e2adc10084ab5ec29a62f4b6671a82","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":8.7,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-400","description":"CWE-400 Uncontrolled Resource Consumption","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-770","description":"CWE-770 Allocation of Resources Without Limits or Throttling","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-07-31T14:08:25.397Z"},"credits":[{"lang":"en","type":"reporter","value":"J. Nick Koston"},{"lang":"en","type":"coordinator","value":"Seth Larson"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"python_software_foundation","product":"cpython","defaultStatus":"unknown","versions":[{"version":"3.12.0","status":"affected","lessThan":"3.14.0a1","versionType":"python"}],"cpes":["cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-12-06T15:35:11.234951Z","id":"CVE-2024-12254","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-770","type":"CWE","lang":"en","description":"CWE-770 Allocation of Resources Without Limits or Throttling"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-05T16:54:28.955Z"}},{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2024/12/06/1"},{"url":"https://security.netapp.com/advisory/ntap-20250404-0010/"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-04-04T23:03:00.653Z"}}]}}}