CVE-2026-6019: CWE-150 Improper neutralization of escape, meta, or control sequences in Python Software Foundation CPython
CVE-2026-6019 is a low-severity vulnerability in the Python Software Foundation's CPython implementation. The issue arises in the http. cookies. Morsel. js_output() method, which returns an inline <script> snippet but only escapes double quotes for JavaScript string context. It fails to neutralize the HTML parser-sensitive sequence </script> inside the generated script element, potentially allowing injection of unintended script termination. The recommended mitigation is to base64-encode the cookie value to prevent escaping via the cookie content. No official patch or vendor advisory is currently available, and no known exploits exist in the wild.
AI Analysis
Technical Summary
The vulnerability CVE-2026-6019 in CPython's http.cookies.Morsel.js_output() method involves improper neutralization of escape, meta, or control sequences (CWE-150). Specifically, the method escapes only double quotes for JavaScript string context but does not neutralize the sequence </script> within the inline script element it generates. This can lead to premature termination of the script block and potential injection issues. The mitigation suggested is to base64-encode the cookie value to prevent such escaping. The CVSS 4.0 score is 2.1, indicating low severity. There is no official patch or remediation level declared by the vendor as of the published date.
Potential Impact
The impact is limited due to the low CVSS score (2.1) and the nature of the vulnerability, which involves incomplete escaping of a script element in cookie output. This could potentially allow injection of unintended script termination sequences, but no known exploits are reported. The vulnerability requires high privileges to exploit (PR:H) and user interaction is not required. The overall impact on confidentiality, integrity, and availability is low.
Mitigation Recommendations
No official patch or remediation level has been published by the Python Software Foundation. The recommended mitigation is to base64-encode the cookie value before using it in the js_output() method to prevent escaping issues. Users should monitor the vendor advisory for any future updates or official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
CVE-2026-6019: CWE-150 Improper neutralization of escape, meta, or control sequences in Python Software Foundation CPython
Description
CVE-2026-6019 is a low-severity vulnerability in the Python Software Foundation's CPython implementation. The issue arises in the http. cookies. Morsel. js_output() method, which returns an inline <script> snippet but only escapes double quotes for JavaScript string context. It fails to neutralize the HTML parser-sensitive sequence </script> inside the generated script element, potentially allowing injection of unintended script termination. The recommended mitigation is to base64-encode the cookie value to prevent escaping via the cookie content. No official patch or vendor advisory is currently available, and no known exploits exist in the wild.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-6019 in CPython's http.cookies.Morsel.js_output() method involves improper neutralization of escape, meta, or control sequences (CWE-150). Specifically, the method escapes only double quotes for JavaScript string context but does not neutralize the sequence </script> within the inline script element it generates. This can lead to premature termination of the script block and potential injection issues. The mitigation suggested is to base64-encode the cookie value to prevent such escaping. The CVSS 4.0 score is 2.1, indicating low severity. There is no official patch or remediation level declared by the vendor as of the published date.
Potential Impact
The impact is limited due to the low CVSS score (2.1) and the nature of the vulnerability, which involves incomplete escaping of a script element in cookie output. This could potentially allow injection of unintended script termination sequences, but no known exploits are reported. The vulnerability requires high privileges to exploit (PR:H) and user interaction is not required. The overall impact on confidentiality, integrity, and availability is low.
Mitigation Recommendations
No official patch or remediation level has been published by the Python Software Foundation. The recommended mitigation is to base64-encode the cookie value before using it in the js_output() method to prevent escaping issues. Users should monitor the vendor advisory for any future updates or official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-04-09T15:35:00.668Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e9290319fe3cd2cde955b1
Added to database: 4/22/2026, 8:01:07 PM
Last enriched: 4/22/2026, 8:16:17 PM
Last updated: 4/22/2026, 10:24:19 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.