CVE-2022-29546: OutOfMemory Exception by specifically crafted processing instruction in NekoHtml Parser
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34264%
CWE
Published
4/26/2022
Updated
1/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
net.sourceforge.htmlunit:neko-htmlunit | maven | < 2.61.0 | 2.61.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper input termination handling in the processing instruction parsing logic. The commit diff shows the critical fix in HTMLScanner.java
's scanPI()
method, where a missing EOF check (-1) allowed infinite buffer growth. The added test case 'invalidProcessingInstruction' demonstrates how malformed PI input (<?a/) triggers this condition. The function's loop structure and buffer append operation directly correlate with uncontrolled memory consumption described in CWE-400.