The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-24839

CVE-2022-24839: Nekohtml DoS Vulnerability

CVE-2022-24839 is a denial of service vulnerability in Nekohtml HTML parser that triggers OutOfMemoryError when parsing malformed HTML. This article covers the technical details, affected versions, impact, and mitigation.

Published: February 17, 2026

CVE-2022-24839 Overview

CVE-2022-24839 is a Denial of Service vulnerability in org.cyberneko.html, 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. This vulnerability affects applications that rely on the NekoHTML parser for processing untrusted HTML content, potentially allowing remote attackers to exhaust server memory resources with specially crafted malicious input.

Critical Impact

Remote attackers can cause application denial of service by sending malformed HTML markup that triggers memory exhaustion, leading to java.lang.OutOfMemoryError exceptions and potential service disruption.

Affected Products

  • NekoHTML Project NekoHTML (versions prior to 1.9.22.noko2)
  • Oracle WebLogic Server 12.2.1.3.0
  • Oracle WebLogic Server 12.2.1.4.0
  • Oracle WebLogic Server 14.1.1.0.0

Discovery Timeline

  • April 11, 2022 - CVE-2022-24839 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2022-24839

Vulnerability Analysis

This vulnerability is classified as CWE-400 (Uncontrolled Resource Consumption), a resource exhaustion vulnerability that manifests when the NekoHTML parser processes malformed HTML content. The flaw resides in the HTMLScanner.java component, specifically in the processing instruction (PI) parsing logic.

When the parser encounters ill-formed processing instructions in HTML markup, it can enter a state where it fails to properly terminate parsing, leading to unbounded memory allocation. The vulnerability is remotely exploitable without authentication, requiring no user interaction to trigger.

The upstream library org.cyberneko.html is no longer maintained. Nokogiri uses its own fork of this library located at the Sparklemotion NekoHTML repository, and this CVE applies only to that fork. Other forks of NekoHTML may have a similar vulnerability.

Root Cause

The root cause lies in the HTMLScanner.java file where processing instruction parsing fails to account for end-of-file (-1) conditions when checking for termination characters. When parsing ill-formed PIs, the scanner only checked for the > character to break out of the parsing loop. If the input stream ended unexpectedly (returning -1), the parser would continue attempting to process input, leading to memory exhaustion.

Attack Vector

The attack vector is network-based, allowing remote unauthenticated attackers to exploit this vulnerability. An attacker can craft malicious HTML content with ill-formed processing instructions and submit it to any application using the vulnerable NekoHTML parser. When the application attempts to parse this malformed input, the parser enters an infinite loop or unbounded allocation state, consuming available memory until a java.lang.OutOfMemoryError is thrown.

This vulnerability is particularly dangerous in web applications that accept user-supplied HTML content for sanitization, rendering, or transformation purposes.

java
// Security patch from HTMLScanner.java
// Source: https://github.com/sparklemotion/nekohtml/commit/a800fce3b079def130ed42a408ff1d09f89e773d

                     if (c == '?' || c == '/') {
                         char c0 = (char)c;
                         c = fCurrentEntity.read();
-                        if (c == '>') {
+                        if (c == '>' || c == -1) {
                             break;
                         }
                         fStringBuffer.append(c0);

The patch adds a check for -1 (end-of-file) in addition to the > character, ensuring the parser properly terminates when encountering malformed input that ends unexpectedly.

Detection Methods for CVE-2022-24839

Indicators of Compromise

  • Unusual spikes in JVM heap memory usage in applications using NekoHTML
  • Frequent java.lang.OutOfMemoryError exceptions in application logs
  • HTTP requests containing malformed HTML with unusual processing instruction syntax
  • Increased garbage collection activity followed by memory exhaustion

Detection Strategies

  • Monitor application logs for OutOfMemoryError exceptions originating from org.cyberneko.html.HTMLScanner classes
  • Implement resource monitoring to detect abnormal memory consumption patterns during HTML parsing operations
  • Deploy web application firewalls (WAF) with rules to detect and block malformed HTML content patterns
  • Use dependency scanning tools to identify vulnerable versions of NekoHTML in your application dependencies

Monitoring Recommendations

  • Configure JVM memory alerts to trigger when heap usage exceeds normal operational thresholds
  • Implement request timeout policies for HTML parsing operations to prevent long-running parse operations
  • Log and analyze incoming HTML content patterns that trigger parsing errors
  • Monitor application availability and response times for services that process HTML content

How to Mitigate CVE-2022-24839

Immediate Actions Required

  • Upgrade to NekoHTML version 1.9.22.noko2 or later immediately
  • Review and update Oracle WebLogic Server installations to patched versions per the Oracle Security Alert July 2022
  • Implement input size limits for HTML content submitted to applications
  • Configure JVM memory limits and enable automatic restart on OutOfMemoryError conditions

Patch Information

The vulnerability has been addressed in NekoHTML version 1.9.22.noko2 and later. Users of Nokogiri should update their dependencies to pull in the patched NekoHTML fork. The security fix is documented in the GitHub Security Advisory GHSA-9849.

For Oracle WebLogic Server deployments, apply the patches referenced in the Oracle Security Alert July 2022. Affected versions include 12.2.1.3.0, 12.2.1.4.0, and 14.1.1.0.0.

Workarounds

  • Implement input validation to reject HTML content exceeding reasonable size thresholds before parsing
  • Configure resource limits (memory, CPU time) for HTML parsing operations at the application or container level
  • Deploy a reverse proxy or WAF to inspect and filter potentially malicious HTML content
  • Consider using alternative HTML parsing libraries if immediate patching is not feasible
bash
# Configuration example - Maven dependency update
# Update your pom.xml to use the patched version:
# <dependency>
#   <groupId>org.nokogiri</groupId>
#   <artifactId>nekohtml</artifactId>
#   <version>1.9.22.noko2</version>
# </dependency>

# For Bundler (Ruby/Nokogiri), update Gemfile:
# gem 'nokogiri', '>= 1.13.4'

# Verify installed version
bundle show nokogiri

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechNekohtml

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.45%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-9849

  • Oracle Security Alert July 2022
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English