CVE-2022-29546: OutOfMemory Exception in NekoHtml Parser
Summary
CVE-2022-29546: OutOfMemory Exception by specifically crafted processing instruction in NekoHtml Parser. Affects net.sourceforge.htmlunit:neko-htmlunit versions < 2.61.0. Fixed in 2.61.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The NekoHtml Parser is a library used for parsing HTML documents in Java applications. It provides functionality for processing HTML content and extracting information from it. The library is commonly used in web scraping, web testing, and other applications that require HTML parsing. However, versions 2.60.0 and below of the NekoHtml Parser are vulnerable to a denial of service attack. An attacker can exploit a specifically crafted processing instruction to cause the parser to consume excessive heap memory, leading to an OutOfMemory Exception. This vulnerability can result in the application becoming unresponsive or crashing.
Vulnerability Detail
The vulnerability in the NekoHtml Parser arises from a lack of proper input validation and handling of processing instructions. By providing a specially crafted input, an attacker can trigger the parser to consume large amounts of heap memory, leading to resource exhaustion and denial of service. The impact of this vulnerability can be severe, as it can render the affected application unresponsive or cause it to crash. The vulnerability has been assigned a CVSS score of 7.5, indicating a high severity level.
How To Fix
Minimum fixed version
2.61.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. The only effective solution is to update the NekoHtml Parser library to a non-vulnerable version.
Conclusion
The NekoHtml Parser library is vulnerable to a denial of service attack due to improper handling of processing instructions. This can result in resource exhaustion and application crashes. To mitigate this vulnerability, it is crucial to update the library to version 2.61.0 or above. Developers should ensure that their projects are using the latest non-vulnerable version of the library. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for net.sourceforge.htmlunit:neko-htmlunit →
FAQ
The vulnerability can lead to a denial of service condition, causing the affected application to become unresponsive or crash.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your pom.xml file and the playground will analyze it for any vulnerable dependencies.
Yes, the vulnerability can be fixed by updating the NekoHtml Parser library to version 2.61.0 or above.
Yes, this vulnerability can be exploited remotely by sending a specially crafted input to the affected application.
There are no known instances of this vulnerability being exploited in the wild at the time of writing this report.
References
Related vulnerabilities
Recent vulnerabilities recorded for net.sourceforge.htmlunit:neko-htmlunit.