CVE-2025-22872: Incorrect Neutralization of Input During Web Page Generation in x/net in golang.org/x/net
Incorrect Neutralization of Input During Web Page Generation in x/net in golang.org/x/net
Other sources
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. , , etc contexts).
— IBM
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).
— NVD
Affected Software
Event History
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.