Tesseract OCR engine vulnerabilities patched in Ubuntu via ESM Apps
Multiple vulnerabilities in the Tesseract OCR engine allow for denial of service through crafted model, template, or input files.
Summary
Ubuntu has released security updates to address several vulnerabilities in the Tesseract optical character recognition (OCR) engine. These flaws allow attackers to trigger application crashes or memory corruption by providing specially crafted files during the recognition process.
The vulnerabilities affect multiple Ubuntu Long Term Support (LTS) releases, including 22.04, 24.04, and 26.04. Fixes for these issues are currently provided through Ubuntu Pro via ESM (Expanded Security Maintenance) Apps, requiring users to have an active subscription or Ubuntu Pro enablement to receive the patched libtesseract and tesseract-ocr packages.
Vulnerability breakdown and affected versions
- Memory Management (CVE-2021-36081): A use-after-free vulnerability exists in Ubuntu 22.04 LTS due to incorrect handling of internal string operations during character recognition.
- Model File Handling (CVE-2026-119339 & CVE-2026-119340): Tesseract fails to properly validate matrix dimensions and unsupported weight matrix formats in model files, leading to out-of-bounds memory access or application aborts in Ubuntu 24.04 and 26.04 LTS.
- Data Structure Initialization (CVE-2026-119341): Improper initialization of internal data structures when loading template files can result in memory corruption and denial of service.
- Package Versions: Patched versions include libtesseract5 5.5.0-1ubuntu0.1~esm2 for Ubuntu 26.04 and libtesseract4 4.1.1-2.1ubuntu0.1~esm2 for Ubuntu 22.04.
Why it matters
Since Tesseract is a widely used engine for automated text extraction, these vulnerabilities pose a risk to any system or service that processes untrusted documents or images. Users of Ubuntu LTS distributions must utilize Ubuntu Pro to secure their OCR pipelines against these denial-of-service vectors.
Original reference: ubuntu.com →