Denial of Service Vulnerability in Leptonica Library (CVE-2022-38266)

leptonlib Updated 02 Oct 2025

Summary

09/09/2022
N/A
Yes i
Medium
6.5

CVE-2022-38266: An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial of Service (DoS) via a crafted JPEG file. Affects leptonlib across 2 version ranges.

< 1.79.0-1.1+deb11u1 < f062b42c0ea8dddebdc6a152fd16152de215d614

Fixed in 1.79.0-1.1+deb11u1. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Leptonica is an open-source library widely used for image processing and analysis. It provides various functionalities, including image reading, writing, and manipulation, making it a crucial component in many applications that handle image data. The library is known for its efficiency and versatility, but like any software, it can be susceptible to vulnerabilities that may compromise its stability and security.

Vulnerability Detail

CVE-2022-38266 is a vulnerability found in the Leptonica library version 1.79.0 that allows attackers to exploit an arithmetic exception through a specially crafted JPEG file. This can lead to a Denial of Service (DoS), causing the application using the library to crash or become unresponsive. The vulnerability arises from improper handling of certain image formats, which can trigger unexpected behavior in the library's processing functions.

How To Fix

Minimum fixed version

1.79.0-1.1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade leptonlib

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

Workaround

If immediate upgrading is not feasible, consider implementing input validation to filter out potentially malicious JPEG files before processing them with the Leptonica library. This can help mitigate the risk of triggering the vulnerability.

Conclusion

CVE-2022-38266 represents a significant vulnerability in the Leptonica library that can lead to Denial of Service attacks. It is crucial for users to upgrade to the latest versions of the library to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround until the upgrade is completed.

See every vulnerability recorded for leptonlib →

Share this vulnerability

FAQ

CVE-2022-38266 is a vulnerability in the Leptonica library that can lead to a Denial of Service due to improper handling of crafted JPEG files.

Exploiting this vulnerability can cause your application to crash or become unresponsive, impacting user experience and service availability.

The vulnerability affects Leptonica version 1.79.0. Users should upgrade to version 1.79.0-1.1+deb11u1 for Debian 11, or 1.82.0-1 for Debian 12 and 13.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup.

The CVSS score for CVE-2022-38266 is 6.5, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for leptonlib.

How To Fix

Minimum fixed version

1.79.0-1.1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade leptonlib

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