CWE
79
Advisory Published
Advisory Published
Updated

CVE-2025-22872: Incorrect Neutralization of Input During Web Page Generation in x/net in golang.org/x/net

First published: Wed Apr 16 2025(Updated: )

The tokenizer incorrectly interprets tags with unquoted attribute values that end with a solidus character (/) as self-closing. When directly using Tokenizer, this can result in such tags incorrectly being marked as self-closing, and when using the Parse functions, this can result in content following such tags as being placed in the wrong scope during DOM construction, but only when tags are in foreign content (e.g. <math>, <svg>, etc contexts).

Credit: security@golang.org

Affected SoftwareAffected VersionHow to fix
Google x/net
go/golang.org/x/net<0.38.0
0.38.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-22872?

    CVE-2025-22872 has been classified with a moderate severity level due to its potential to lead to incorrect handling of self-closing tags.

  • How do I fix CVE-2025-22872?

    To fix CVE-2025-22872, you should update to the latest version of the Google x/net library, where the issue has been addressed.

  • What systems are affected by CVE-2025-22872?

    CVE-2025-22872 primarily affects systems using the Google x/net library for processing HTML tags.

  • What are the potential consequences of CVE-2025-22872?

    The consequences of CVE-2025-22872 include incorrect parsing of HTML tags, which could lead to potential security vulnerabilities in web applications.

  • How can I identify if my application is vulnerable to CVE-2025-22872?

    You can identify vulnerability to CVE-2025-22872 by reviewing the version of the Google x/net library used in your application and checking for signed vulnerabilities in your codebase.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203