Denial of Service Vulnerability in libowasp-antisamy-java: Heap Memory Consumption via Crafted Input

libowasp-antisamy-java Updated 02 Oct 2025

Summary

21/04/2022
N/A
Yes i
Unrated
Not published

DEBIAN-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 versions < 1.7.4-1. Fixed in 1.7.4-1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libowasp-antisamy-java is a Java library that provides a way to sanitize HTML and CSS input to prevent XSS attacks. It is widely used in web applications to ensure that user-generated content is safe for display. However, certain versions of this library are vulnerable to a denial of service attack due to improper handling of Processing Instructions (PI) in HTML parsing, leading to excessive heap memory consumption.

Vulnerability Detail

The vulnerability identified as CVE-2022-28366 affects libowasp-antisamy-java versions prior to 1.7.4-1. It originates from the underlying Neko-related HTML parsers, which allow crafted PI input to cause excessive memory usage, potentially leading to application crashes or slowdowns. This issue is particularly concerning for applications that rely on libowasp-antisamy-java for sanitizing user input, as it can be exploited to disrupt service availability.

How To Fix

Minimum fixed version

1.7.4-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libowasp-antisamy-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot immediately update the package, consider implementing input validation to limit the types of input that can be processed by the library. This may involve filtering out or rejecting any input that contains Processing Instructions.

Conclusion

The CVE-2022-28366 vulnerability in libowasp-antisamy-java poses a significant risk due to its potential for denial of service through excessive memory consumption. It is crucial to update to the patched version 1.7.4-1 or later to ensure the security and stability of applications using this library. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for libowasp-antisamy-java →

Share this vulnerability

FAQ

CVE-2022-28366 is a vulnerability in libowasp-antisamy-java that allows denial of service through excessive heap memory consumption caused by crafted Processing Instruction input.

Versions prior to 1.7.4-1 are affected by this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file, you can check for vulnerabilities without needing to access the code.

Exploitation of this vulnerability can lead to application crashes or significant slowdowns, affecting service availability and user experience.

Yes, implementing input validation to filter out problematic input can help mitigate the risk until you can update to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for libowasp-antisamy-java.

How To Fix

Minimum fixed version

1.7.4-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libowasp-antisamy-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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