CVE-2025-0938: URL parser allowed square brackets in domain names

Published Jan 31, 2025
·
Updated

Last updated 24 March 2025

Other sources

The Python standard library functions urllib.parse.urlsplit and urlparse accepted domain names that included square brackets which isn't valid according to RFC 3986. Square brackets are only meant to be used as delimiters for specifying IPv6 and IPvFuture hosts in URLs. This could result in differential parsing across the Python URL parser and other specification-compliant URL parsers.

— NVD

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

— Launchpad

URL parser allowed square brackets in domain names

— Microsoft

Affected Software

44 affected componentsFixes available
Python Software Foundation Python
Microsoft cbl2 python3 3.9.19-10
Microsoft azl3 python3 3.12.3-5
Microsoft azl3 python3 3.12.9-1
Microsoft cbl2 python3 3.9.19-13
debian/pypy3*
debian/pypy3<7.3.18+dfsg-2
7.3.18+dfsg-2
debian/pypy3<7.3.18+dfsg-2
7.3.18+dfsg-2
debian/python3.11<3.11.2-6+deb12u6
3.11.2-6+deb12u6
debian/python3.13<3.13.2-1
3.13.2-1
ubuntu/python2.7<2.7.6-8ubuntu0.6+esm28
2.7.6-8ubuntu0.6+esm28
ubuntu/python3.4<3.4.3-1ubuntu1~14.04.7+esm15
3.4.3-1ubuntu1~14.04.7+esm15
ubuntu/python3.5<3.5.2-2ubuntu0~16.04.4~14.04.1+esm4
3.5.2-2ubuntu0~16.04.4~14.04.1+esm4
ubuntu/python2.7<2.7.12-1ubuntu0~16.04.18+esm16
2.7.12-1ubuntu0~16.04.18+esm16
ubuntu/python3.5<3.5.2-2ubuntu0~16.04.13+esm16
3.5.2-2ubuntu0~16.04.13+esm16
ubuntu/python2.7<2.7.17-1~18.04ubuntu1.13+esm11
2.7.17-1~18.04ubuntu1.13+esm11
ubuntu/python3.6<3.6.9-1~18.04ubuntu1.13+esm4
3.6.9-1~18.04ubuntu1.13+esm4
ubuntu/python3.7<3.7.5-2ubuntu1~18.04.2+esm5
3.7.5-2ubuntu1~18.04.2+esm5
ubuntu/python3.8<3.8.0-3ubuntu1~18.04.2+esm4
3.8.0-3ubuntu1~18.04.2+esm4
ubuntu/python3.8<3.8.10-0ubuntu1~20.04.16
3.8.10-0ubuntu1~20.04.16
ubuntu/pypy3*
ubuntu/python2.7<2.7.18-1~20.04.7+esm7
2.7.18-1~20.04.7+esm7
ubuntu/python3.9<3.9.5-3ubuntu0~20.04.1+esm4
3.9.5-3ubuntu0~20.04.1+esm4
ubuntu/pypy3*
ubuntu/python3.10<3.10.12-1~22.04.9
3.10.12-1~22.04.9
ubuntu/python2.7<2.7.18-13ubuntu1.5+esm6
2.7.18-13ubuntu1.5+esm6
ubuntu/python3.11<3.11.0~rc1-1~22.04.1~esm3
3.11.0~rc1-1~22.04.1~esm3
ubuntu/pypy3*
ubuntu/python3.12<3.12.3-1ubuntu0.5
3.12.3-1ubuntu0.5
ubuntu/pypy3*
ubuntu/pypy3*
ubuntu/pypy3*
alpine/python3<3.11.12-r0
3.11.12-r0
alpine/python3<3.11.12-r0
3.11.12-r0
alpine/python3<3.12.9-r0
3.12.9-r0
alpine/python3<3.12.9-r0
3.12.9-r0
alpine/python3<3.12.9-r0
3.12.9-r0
alpine/python3<3.12.9-r0
3.12.9-r0
alpine/python3<3.12.9-r0
3.12.9-r0
debian/pypy3<=7.3.11+dfsg-2+deb12u3
7.3.5+dfsg-2+deb11u57.3.18+dfsg-2
debian/python3.11
3.11.2-6+deb12u6
debian/python3.13
3.13.2-1
debian/python3.12
3.12.9-1
debian/python3.9
3.9.2-1+deb11u3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.18+dfsg-2
  2. Upgrade

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

    Fixed in 3.11.2-6+deb12u6
  3. Upgrade

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

    Fixed in 3.13.2-1
  4. Upgrade

    Upgrade ubuntu/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.6-8ubuntu0.6+esm28
  5. Upgrade

    Upgrade ubuntu/python3.4 to a version that resolves this vulnerability.

    Fixed in 3.4.3-1ubuntu1~14.04.7+esm15
  6. Upgrade

    Upgrade ubuntu/python3.5 to a version that resolves this vulnerability.

    Fixed in 3.5.2-2ubuntu0~16.04.4~14.04.1+esm4
  7. Upgrade

    Upgrade ubuntu/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.12-1ubuntu0~16.04.18+esm16
  8. Upgrade

    Upgrade ubuntu/python3.5 to a version that resolves this vulnerability.

    Fixed in 3.5.2-2ubuntu0~16.04.13+esm16
  9. Upgrade

    Upgrade ubuntu/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.17-1~18.04ubuntu1.13+esm11
  10. Upgrade

    Upgrade ubuntu/python3.6 to a version that resolves this vulnerability.

    Fixed in 3.6.9-1~18.04ubuntu1.13+esm4
  11. Upgrade

    Upgrade ubuntu/python3.7 to a version that resolves this vulnerability.

    Fixed in 3.7.5-2ubuntu1~18.04.2+esm5
  12. Upgrade

    Upgrade ubuntu/python3.8 to a version that resolves this vulnerability.

    Fixed in 3.8.0-3ubuntu1~18.04.2+esm4
  13. Upgrade

    Upgrade ubuntu/python3.8 to a version that resolves this vulnerability.

    Fixed in 3.8.10-0ubuntu1~20.04.16
  14. Upgrade

    Upgrade ubuntu/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-1~20.04.7+esm7
  15. Upgrade

    Upgrade ubuntu/python3.9 to a version that resolves this vulnerability.

    Fixed in 3.9.5-3ubuntu0~20.04.1+esm4
  16. Upgrade

    Upgrade ubuntu/python3.10 to a version that resolves this vulnerability.

    Fixed in 3.10.12-1~22.04.9
  17. Upgrade

    Upgrade ubuntu/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-13ubuntu1.5+esm6
  18. Upgrade

    Upgrade ubuntu/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.0~rc1-1~22.04.1~esm3
  19. Upgrade

    Upgrade ubuntu/python3.12 to a version that resolves this vulnerability.

    Fixed in 3.12.3-1ubuntu0.5
  20. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.11.12-r0
  21. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.12.9-r0
  22. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.5+dfsg-2+deb11u5Fixed in 7.3.18+dfsg-2
  23. Upgrade

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

    Fixed in 3.12.9-1
  24. Upgrade

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

    Fixed in 3.9.2-1+deb11u3

Event History

Jan 31, 2025
CVE Published
via MITRE·05:51 PM
Data Sourced
via MITRE·05:51 PM
DescriptionWeakness
Data Sourced
via OSV·05:51 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·06:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeakness
Feb 25, 2025
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Nov 24, 2026
Data Sourced
via OSV·02:54 PM
Affected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-0938?

CVE-2025-0938 has been classified as a medium severity vulnerability due to potential denial of service risks associated with invalid URL parsing.

2

How do I fix CVE-2025-0938?

To fix CVE-2025-0938, update to the latest version of Python where the vulnerability has been addressed.

3

What software is affected by CVE-2025-0938?

CVE-2025-0938 affects the standard library functions of Python, specifically in the urllib.parse module.

4

What are the implications of CVE-2025-0938?

The implications of CVE-2025-0938 include the possibility of malformed URLs causing unexpected behavior in applications relying on URL parsing.

5

How does CVE-2025-0938 impact web applications?

CVE-2025-0938 can potentially lead to security issues in web applications by allowing the processing of invalid domain names.

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