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> within the generated script element. This can potentially allow injection of unintended script termination sequences. The recommended mitigation is to base64-encode the cookie value to prevent escaping via the cookie content. There is no official patch or vendor advisory confirming remediation status as of now.
AI Analysis
Technical Summary
The vulnerability CVE-2026-6019 in CPython involves improper neutralization of escape, meta, or control sequences (CWE-150) in the http.cookies.Morsel.js_output() function. This function outputs an inline JavaScript snippet embedding cookie data but only escapes double quotes, neglecting to neutralize the </script> sequence that can prematurely close the script tag in HTML. This flaw could lead to injection of unintended script content if an attacker controls the cookie value. The suggested mitigation is to base64-encode cookie values to disallow such escape sequences. No official patch or remediation level has been published by the Python Software Foundation at this time.
Potential Impact
The impact is considered low severity with a CVSS 4.0 score of 2.1. The vulnerability could allow an attacker with high privileges (PR:H) and partial attack complexity (AC:L) to influence the JavaScript context by injecting sequences that prematurely terminate script tags. However, user interaction is not required and the vulnerability has low confidentiality and integrity impact, with no availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The known mitigation is to base64-encode cookie values before embedding them in JavaScript to prevent injection of the </script> sequence. Until an official fix is released, developers should apply this encoding as a workaround to reduce risk.
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> within the generated script element. This can potentially allow injection of unintended script termination sequences. The recommended mitigation is to base64-encode the cookie value to prevent escaping via the cookie content. There is no official patch or vendor advisory confirming remediation status as of now.
CVSS v4.0
Score 2.1low
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-6019 in CPython involves improper neutralization of escape, meta, or control sequences (CWE-150) in the http.cookies.Morsel.js_output() function. This function outputs an inline JavaScript snippet embedding cookie data but only escapes double quotes, neglecting to neutralize the </script> sequence that can prematurely close the script tag in HTML. This flaw could lead to injection of unintended script content if an attacker controls the cookie value. The suggested mitigation is to base64-encode cookie values to disallow such escape sequences. No official patch or remediation level has been published by the Python Software Foundation at this time.
Potential Impact
The impact is considered low severity with a CVSS 4.0 score of 2.1. The vulnerability could allow an attacker with high privileges (PR:H) and partial attack complexity (AC:L) to influence the JavaScript context by injecting sequences that prematurely terminate script tags. However, user interaction is not required and the vulnerability has low confidentiality and integrity impact, with no availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The known mitigation is to base64-encode cookie values before embedding them in JavaScript to prevent injection of the </script> sequence. Until an official fix is released, developers should apply this encoding as a workaround to reduce risk.
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: 6/3/2026, 9:19:56 PM
Last updated: 6/6/2026, 2:53:40 PM
Views: 73
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.