# CVE-2024-12254: Unbounded memory buffering in SelectorSocketTransport.writelines()

- Severity: High 8.7 (CVSS:4.0, scored by PSF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.87%, higher than 79% of CVEs (2026-12-01)
- Published: 2024-12-06T15:19:41.576Z
- Modified: 2026-07-31T15:16:26.553Z
- Also known as: PSF-2024-14, BIT-LIBPYTHON-2024-12254, BIT-PYTHON-2024-12254, BIT-PYTHON-MIN-2024-12254
- Weaknesses: CWE-400, CWE-770
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: PSF

## Description

Starting in Python 3.12.0, the asyncio._SelectorSocketTransport.writelines()
 method would not "pause" writing and signal to the Protocol to drain 
the buffer to the wire once the write buffer reached the "high-water 
mark". Because of this, Protocols would not periodically drain the write
 buffer potentially leading to memory exhaustion.





This
 vulnerability likely impacts a small number of users, you must be using
 Python 3.12.0 or later, on macOS or Linux, using the asyncio module 
with protocols, and using .writelines() method which had new 
zero-copy-on-write behavior in Python 3.12.0 and later. If not all of 
these factors are true then your usage of Python is unaffected.

(As written by CVE List.)

## Affected

- Python Software Foundation CPython: before 3.12.9; from 3.13.0 before 3.13.2; from 3.14.0a1 before 3.14.0a3
- python_software_foundation cpython: from 3.12.0 before 3.14.0a1
- https://github.com/python/cpython: before 71e8429ac8e2adc10084ab5ec29a62f4b6671a82; before 9aa0deb2eef2655a1029ba228527b152353135b5; before e991ac8f2037d78140e417cc9a9486223eb3e786
- libpython (Bitnami): from 3.12.0 before 3.12.9; from 3.13.0 before 3.13.2
- python (Bitnami): from 3.12.0 before 3.12.9; from 3.13.0 before 3.13.2
- python-min (Bitnami): from 3.12.0 before 3.12.9; from 3.13.0 before 3.13.2

## Every score

- PSF: CVSS:4.0 8.7 High `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`
- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/python/cpython/issues/127655> (issue-tracking, report, web)
- <https://github.com/python/cpython/pull/127656> (patch, web)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/> (advisory, vendor-advisory, web)
- <https://github.com/python/cpython/commit/71e8429ac8e2adc10084ab5ec29a62f4b6671a82> (fix, patch, web)
- <https://github.com/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5> (fix, patch, web)
- <https://github.com/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786> (fix, patch, web)
- <http://www.openwall.com/lists/oss-security/2024/12/06/1> (web)
- <https://security.netapp.com/advisory/ntap-20250404-0010/> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-12254> (web)

## Sources

- CVE List: [CVE-2024-12254](https://www.cve.org/CVERecord?id=CVE-2024-12254), CVE Terms of Use, modified 2026-07-31
- Python Software Foundation: [PSF-2024-14](https://osv.dev/vulnerability/PSF-2024-14), CC-BY-4.0, modified 2025-10-09
- NVD: [CVE-2024-12254](https://nvd.nist.gov/vuln/detail/CVE-2024-12254), Public domain, modified 2026-07-31
- Bitnami Vulnerability Database: [BIT-LIBPYTHON-2024-12254](https://osv.dev/vulnerability/BIT-LIBPYTHON-2024-12254), Apache-2.0, modified 2025-08-11
- Bitnami Vulnerability Database: [BIT-PYTHON-2024-12254](https://osv.dev/vulnerability/BIT-PYTHON-2024-12254), Apache-2.0, modified 2025-08-11
- Bitnami Vulnerability Database: [BIT-PYTHON-MIN-2024-12254](https://osv.dev/vulnerability/BIT-PYTHON-MIN-2024-12254), Apache-2.0, modified 2025-08-11

---

Page: https://cve.day/CVE-2024-12254 · Whole record: https://cve.day/CVE-2024-12254.json · Rebuilt by cve.day 2026-11-25T22:58:49.789Z
