USN-9221-1: Tesseract vulnerabilities
It was discovered that Tesseract incorrectly handled certain internal string operations during character recognition. An attacker could use a crafted input to cause a use-after-free and denial of service. This issue only affects Ubuntu 22.04 LTS. (CVE-2021-36081) It was discovered that Tesseract incorrectly handled certain model files with unsupported weight matrix formats. An attacker could use a crafted model file to cause Tesseract to abort, resulting in a denial of service. This issue only affects Ubuntu 24.04 LTS and Ubuntu 26.04 LTS. (CVE-2026-119339) It was discovered that Tesseract did not properly validate matrix dimensions when loading model files. An attacker could use a crafted model file to cause out-of-bounds memory access, resulting in a denial of service. (CVE-2026-119340) It was discovered that Tesseract did not properly initialize internal data structures when loading template files. An attacker could use a crafted template file to cause memory corruption, resulting in a denial of service. (CVE-2026-119341)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/libtesseract5to a version that resolves this vulnerability.Fixed in Ubuntu Pro - Upgrade
Upgrade
ubuntu/tesseract-ocrto a version that resolves this vulnerability.Fixed in Ubuntu Pro - Upgrade
Upgrade
ubuntu/libtesseract4to a version that resolves this vulnerability.Fixed in Ubuntu Pro
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
What kind of input must an attacker control to trigger these issues?
CVE-2021-36081 can be triggered with crafted input during character recognition. CVE-2026-119339 and CVE-2026-119340 require a crafted model file, while CVE-2026-119341 requires a crafted template file.
Which Ubuntu releases are specifically identified as affected?
CVE-2021-36081 only affects Ubuntu 22.04 LTS. CVE-2026-119339 only affects Ubuntu 24.04 LTS and Ubuntu 26.04 LTS; no release-specific scope is provided for CVE-2026-119340 or CVE-2026-119341.
What is the expected impact of successful exploitation?
All listed issues can result in denial of service. CVE-2021-36081 involves a use-after-free, CVE-2026-119340 causes out-of-bounds memory access, and CVE-2026-119341 can cause memory corruption.