CVE-2026-6019: BaseCookie.js_output() does not neutralize embedded characters

Published Apr 22, 2026
·
Updated

http.cookies.Morsel.jsoutput() returns an inline <script> snippet and only escapes " for JavaScript string context. It does not neutralize the HTML parser-sensitive sequence </script> inside the generated script element. Mitigation base64-encodes the cookie value to disallow escaping using cookie value.

Affected Software

17 affected componentsFixes available
Python http.cookies.Morsel
debian/pypy3<=7.3.5+dfsg-2+deb11u2, <=7.3.5+dfsg-2+deb11u5, <=7.3.11+dfsg-2+deb12u3, <=7.3.19+dfsg-2, <=7.3.23+dfsg-1
debian/python3.11<=3.11.2-6+deb12u7, <=3.11.2-6+deb12u3
debian/python3.13
3.13.5-2+deb13u23.13.14-1
debian/python3.14
3.14.6-1
debian/python3.9<=3.9.2-1, <=3.9.2-1+deb11u7
Python Python<3.15.0
Python Python<3.13.14
Python Python>=3.14.0<=3.14.4
Python Python=3.15.0-alpha1
Python Python=3.15.0-alpha2
Python Python=3.15.0-alpha3
Python Python=3.15.0-alpha4
Python Python=3.15.0-alpha5
Python Python=3.15.0-alpha6
Python Python=3.15.0-alpha7
Python Python=3.15.0-alpha8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/python3.13 to a version that resolves this vulnerability.

    Fixed in 3.13.5-2+deb13u2Fixed in 3.13.14-1
  2. Upgrade

    Upgrade debian/python3.14 to a version that resolves this vulnerability.

    Fixed in 3.14.6-1
  3. Configuration

    Mitigation: base64-encode the cookie value so embedded characters (e.g., HTML parser-sensitive sequences like </script>) cannot be used to escape the generated <script> element.

    http.cookies.Morsel.js_output() output escaping = base64-encode cookie value

Event History

Apr 22, 2026
CVE Published
via MITRE·07:28 PM
Data Sourced
via MITRE·07:28 PM
DescriptionWeakness
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 7, 2026
Data Sourced
via Ubuntu·01:34 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·01:35 PM
DescriptionAffected Software
Data Sourced
via Launchpad·01:35 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-6019?

CVE-2026-6019 is classified as a high-severity vulnerability due to the potential for cross-site scripting (XSS) attacks.

2

How do I fix CVE-2026-6019?

To mitigate CVE-2026-6019, ensure that your implementation of the http.cookies.Morsel module properly neutralizes sensitive characters in script outputs.

3

What software is affected by CVE-2026-6019?

CVE-2026-6019 affects the Python http.cookies.Morsel module.

4

What type of vulnerability is CVE-2026-6019?

CVE-2026-6019 is a cross-site scripting (XSS) vulnerability due to improper handling of embedded characters in generated script tags.

5

When was CVE-2026-6019 disclosed?

CVE-2026-6019 was disclosed in 2026, following its identification as a security issue within the Python standard library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203