Heap Buffer Overflow in HTMLDOC Package - CVE-2022-0137

htmldoc Updated 02 Oct 2025

Summary

14/11/2022
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-0137: A heap buffer overflow in image_set_mask function of HTMLDOC before 1.9.15 allows an attacker to write outside the buffer boundaries. Affects htmldoc versions < 1.9.15-1. Fixed in 1.9.15-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 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

HTMLDOC is a tool that converts HTML documents into various formats such as PDF and PostScript. It is widely used for generating documentation from web content. The package is known for its ability to handle complex HTML structures and produce high-quality outputs. However, it has been identified to have a vulnerability that could lead to severe security risks if not addressed.

Vulnerability Detail

A heap buffer overflow in the image_set_mask function of HTMLDOC versions prior to 1.9.15 allows an attacker to write outside the buffer boundaries. This vulnerability can be exploited to execute arbitrary code, potentially compromising the system's integrity and confidentiality. The issue arises from improper handling of memory allocation, which can lead to data corruption and unauthorized access.

How To Fix

Minimum fixed version

1.9.15-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade htmldoc

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

Workaround

As a temporary measure, users can limit the exposure of the HTMLDOC tool by restricting access to it or by using alternative tools for document conversion until the package is updated.

Conclusion

The heap buffer overflow vulnerability in the HTMLDOC package (CVE-2022-0137) poses significant security risks. Users are strongly encouraged to update to the latest version to mitigate these risks. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for htmldoc →

Share this vulnerability

FAQ

CVE-2022-0137 is a security vulnerability in the HTMLDOC package that allows for a heap buffer overflow, potentially leading to arbitrary code execution.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.

The risks include potential unauthorized access to system resources, data corruption, and the ability for attackers to execute arbitrary code on the affected system.

Yes, a patch is available in version 1.9.15-1 of the HTMLDOC package. Users are advised to update to this version or later.

If immediate updates are not possible, consider restricting access to the HTMLDOC tool and using alternative document conversion methods until the update can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for htmldoc.

How To Fix

Minimum fixed version

1.9.15-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade htmldoc

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