Denial of Service Vulnerability in Woodstox XML Parser (CVE-2022-40152)

libwoodstox-java Updated 02 Oct 2025

Summary

16/09/2022
N/A
No i
High
7.5

CVE-2022-40152: Those using Woodstox to parse XML data may be vulnerable to Denial of Service attacks (DOS) if DTD support is enabled. Affects libwoodstox-java across 2 version ranges.

< 3d168dc71fe5c7e22ab3cf7d7bfd7ae87dafc9c7 < f124f777fb8831430f930816a9e18813788c69cb

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

Woodstox is an open-source XML processor written in Java, designed to provide high-performance parsing and streaming of XML data. It is widely used in various applications for its efficiency and compliance with XML standards. However, when DTD (Document Type Definition) support is enabled, Woodstox becomes susceptible to Denial of Service (DoS) attacks, particularly when processing untrusted XML input.

Vulnerability Detail

The vulnerability identified as CVE-2022-40152 arises from the way Woodstox handles XML parsing with DTD support. If an attacker supplies malicious XML content, it can lead to a stack overflow, causing the parser to crash. This vulnerability can be exploited to launch Denial of Service attacks, making the application unresponsive. The severity of this vulnerability is reflected in its CVSS score of 7.5, indicating a high risk to systems utilizing the affected versions of Woodstox.

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

As a temporary measure, you can disable DTD processing in your Woodstox configuration. This can be done by setting the following property in your XML parser setup:

System.setProperty("javax.xml.XMLConstants/property/accessExternalDTD", "all");

Conclusion

CVE-2022-40152 represents a significant vulnerability in the Woodstox XML parser, particularly for applications that enable DTD support. Users are strongly encouraged to update their Woodstox installations to the latest version to avoid potential Denial of Service attacks. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities in open-source software effectively.

See every vulnerability recorded for libwoodstox-java →

Share this vulnerability

FAQ

CVE-2022-40152 is a vulnerability in the Woodstox XML parser that can lead to Denial of Service attacks due to improper handling of DTD support.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check if your application is affected by CVE-2022-40152.

Exploitation of this vulnerability can cause the Woodstox parser to crash, leading to application downtime and potential service disruptions.

Yes, a patch is available. Users should update to the latest version of Woodstox that addresses CVE-2022-40152.

If immediate updating is not possible, you should disable DTD support in your XML parser configuration to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for libwoodstox-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