Denial of Service Vulnerability in libowasp-antisamy-java and HtmlUnit-Neko

libowasp-antisamy-java Updated 02 Oct 2025

Summary

21/04/2022
N/A
No i
High
7.5

CVE-2022-28366: Certain Neko-related HTML parsers allow a denial of service via crafted Processing Instruction (PI) input that causes excessive heap memory consumption. Affects libowasp-antisamy-java across 2 version ranges.

< 99b1143bd2219c7645a8d68ca856a51e67f7bbfa < 7421f043d18741c4e36bf7c0ce8b471122dbf18a

No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libowasp-antisamy-java is a Java library used for sanitizing HTML input to prevent XSS attacks. It relies on HTML parsers like HtmlUnit-Neko for processing HTML content. The vulnerability in question affects these parsers, leading to potential denial of service through excessive memory consumption when handling crafted Processing Instruction (PI) inputs.

Vulnerability Detail

The vulnerability, identified as CVE-2022-28366, arises from certain Neko-related HTML parsers that allow a denial of service due to crafted Processing Instruction (PI) input. This input can cause excessive heap memory consumption, leading to application crashes or slowdowns. The issue is present in HtmlUnit-Neko versions up to 2.26 and CyberNeko HTML through version 1.9.22, which also affects OWASP AntiSamy before version 1.6.6. The CVSS score for this vulnerability is 7.5, indicating a high severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing input validation to filter out potentially harmful Processing Instructions before they reach the HTML parser. This can be done by sanitizing input strings and rejecting any that contain suspicious patterns.

Conclusion

CVE-2022-28366 is a significant vulnerability affecting libowasp-antisamy-java and related HTML parsers, leading to potential denial of service. It is crucial to update to the latest versions to mitigate this risk and ensure the security of your applications.

See every vulnerability recorded for libowasp-antisamy-java →

Share this vulnerability

FAQ

CVE-2022-28366 is a vulnerability in certain HTML parsers that can lead to denial of service due to excessive memory consumption from crafted input.

The affected packages include libowasp-antisamy-java, HtmlUnit-Neko, and CyberNeko HTML.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for this vulnerability is 7.5, indicating a high severity level.

If you cannot upgrade immediately, implement input validation to filter out potentially harmful Processing Instructions.

Related vulnerabilities

Recent vulnerabilities recorded for libowasp-antisamy-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback