Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain write access to the output-basename path
-
DeliveryPlant crafted .a pre-adapted-template file
-
ExploitLegacy engine raw-reads ADAPT_CLASS_STRUCT from file
-
ExecutionDestructor frees file-controlled Config/TempProtos pointers
-
ImpactMemory corruption and process crash (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Pointer release safety
|
| Exploitation Conditions | Three conditions must all hold, per the advisory: (1) the legacy OCR engine must be selected (--oem 0), which is operator-controlled only and cannot be forced by a crafted model; (2) classify_use_pre_adapted_templates must be enabled (it defaults to 0, but can be set either by the operator via -c or by a .traineddata model, since tessedit.cpp passes TESSDATA_LANG_CONFIG with SET_PARAM_CONSTRAINT_NONE); and (3) the attacker must be able to write the file at <output-basename>.a - note this derives from the OUTPUT base name, not the input image name. Limiting factors that reduce realistic risk: this is not triggered by OCRing an untrusted image nor merely by loading an untrusted language pack; it needs the legacy engine plus filesystem write access to the output path, so it applies mainly to batch pipelines or shared working directories where the input supplier can also write the output directory. No authentication-level user interaction is required once the crafted file is in place. |
| Impact | Signals are mostly absent or conflicting, so this scores as a low-to-moderate real-world priority despite being a memory-corruption flaw. The vuln.today decision label is 'awaiting_data', there is no CISA KEV listing and no EPSS score in the input, so there is no evidence of active or probable exploitation. The one published CVSS 3.1 vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N) is internally inconsistent and effectively a placeholder: it sets all three impact metrics to None, which yields a base score of 0 and contradicts the advisory's own stated DoS/memory-corruption impact - treat it as unreliable. It also claims AV:N, but the actual trigger described is a locally planted file (the attacker must be able to write the <output-basename>.a path), so the network vector is almost certainly wrong - verify with the vendor. A full proof-of-concept (extract_inttemp.py, mkpoc.py and sanitizer build steps) is published inside the GHSA advisory and the reporter demonstrated deterministic ASan crashes against current main; however the reporter explicitly stopped at the memory-corruption primitive and did not demonstrate code execution. Weighing these together: the defect is confirmed and reproducible, but exploitation requires a chain of non-default conditions (legacy engine, a non-default config flag, and attacker write access to the output path), which points to targeted/opportunistic abuse of specific pipelines rather than widespread exploitation. |
| Exploit ScenarioDerived | A batch OCR pipeline runs the legacy engine with pre-adapted templates enabled and writes its output to a directory that the party supplying the input can also write to. The attacker plants a crafted <output-basename>.a file whose ADAPT_CLASS_STRUCT contains file-controlled pointers in its TempProtos and Config[] members; on the next run ReadAdaptedClass raw-reads the struct and the success or reject path passes those pointers to ~ADAPT_CLASS_STRUCT and operator delete, corrupting memory and crashing the process. A complete PoC demonstrating deterministic AddressSanitizer crashes is published in the GHSA advisory, but it establishes a denial-of-service/memory-corruption primitive, not code execution. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Memory corruption and denial of service in Tesseract OCR before 5.5.4 occur when the legacy classification engine loads a pre-adapted-template .a file whose raw structure bytes are retained as live pointers, so the ADAPT_CLASS_STRUCT destructor passes attacker-chosen addresses to operator delete and to list freeing. Reaching it requires three coincident conditions: the legacy engine (--oem 0) selected by the operator, classify_use_pre_adapted_templates enabled (default 0, but settable by the operator or by a .traineddata model because parameters are read with no constraint), and write access to the <output-basename>.a path, which derives from the output base name rather than the input image; the independently assessed vector is AV:L/AC:L/PR:H with availability-only impact. The advisory publishes a detailed proof-of-concept that the reporter states deterministically crashes ASan builds, but no active exploitation is confirmed and the issue is not in CISA KEV; with sparse and conflicting signals the decision label is awaiting_data, i.e. a low-to-moderate real-world priority.
RemediationAI
Upgrade to Tesseract 5.5.4, which contains PR #4645 / commit 614e971036d2b95d521057ff63d68d6612429b23 and resets TempProtos and every Config entry right after the raw read in ReadAdaptedClass, plus Templates->Templates and Class[] in ReadAdaptedTemplates, before any destructor path can be reached (release: https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4; advisory: https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-357f-833m-3f83). If upgrading is not immediately possible, the applicable compensating controls are the ones the evidence supports: keep classify_use_pre_adapted_templates at its default of 0 and only load .traineddata models from trusted sources, since the parameter file is parsed with SET_PARAM_CONSTRAINT_NONE and a model can enable it without any -c flag on the command line - the trade-off is that any legitimately pre-adapted workflow stops working; avoid the legacy engine by running with --oem 1 (LSTM) or building with DISABLED_LEGACY_ENGINE, at the cost of losing legacy-model OCR; and remove write access to the output base-name directory for whoever supplies input, since the '<output-basename>.a' path is derived from the output base name rather than the input image name, so shared or batch output directories writable by input suppliers are the realistic exposure - the trade-off is that loosely permissioned batch pipelines and shared working directories will need restructuring. None of these controls has been shown to cover every path, and the fix commit is the authoritative remediation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Tesseract's legacy adaptive classifier persists adapted templates in a binary '.a' pre-adapted-templates file, parsed in src/classify/adaptive.cpp by Classify::ReadAdaptedTemplates and ReadAdaptedClass. ReadAdaptedClass allocates an ADAPT_CLASS_STRUCT and then performs a single raw fp->FRead of the whole 544-byte structure (x86-64), overwriting the in-class value-initialisation; because that struct embeds a LIST TempProtos pointer at offset 24 and a std::array<ADAPTED_CONFIG, 64> Config at offsets 32..543, both become file-controlled pointer values. ~ADAPT_CLASS_STRUCT then unconditionally destroys all MAX_NUM_CONFIGS Config entries and walks the TempProtos list, and each destroyed TEMP_CONFIG_STRUCT frees its Protos bit vector before operator delete is applied to the pointer itself, yielding invalid-pointer release of file-chosen addresses (CWE-763). Commit 8b05746, the earlier fix for CVE-2026-88053, neutralised file-sourced pointers in ReadAdaptedTemplates' Class[] array and on the two ReadAdaptedClass reject paths, but the success path never clears Config[NumConfigs..63] (NumConfigs is itself read from the file, so NumConfigs = 0 leaves all 64 entries intact), and the first reject path clears Config[] while leaving Class->TempProtos = NIL_LIST assigned one line below the branch. PR #4645 closes both gaps by resetting TempProtos and all Config entries immediately after the raw read, before any exit path can reach the destructor, additionally releases the PermProtos/PermConfigs allocations clobbered by the read to avoid a leak, re-activates the Perm union member for slots the file marks permanent so the destructor reads the active union member, and neutralises Templates->Templates and Templates->Class[] in ReadAdaptedTemplates before its reject path; a new unittest/adaptive_test.cc covers the Temp and Perm Config branches. The trigger path is confirmed by source evidence: adaptmatch.cpp:587 is the single caller of ReadAdaptedTemplates, and tessedit.cpp passes TESSDATA_LANG_CONFIG to ParamUtils::ReadParamsFromFp with SET_PARAM_CONSTRAINT_NONE, so a model can set classify_use_pre_adapted_templates, although a model setting tessedit_ocr_engine_mode 0 does not reach the legacy path. What the reporter explicitly did not establish is code execution: the claim is limited to memory corruption with a file-controlled operand, with no heap grooming attempted.
Know when Tesseract gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
Trigger is a locally planted output-basename .a file requiring filesystem write access plus a non-default legacy config, so AV:L/PR:H; demonstrated impact is a deterministic process crash only, so A:H with C:N/I:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Tesseract is an open source OCR engine. Prior to 5.5.4, ReadAdaptedClass in src/classify/adaptive.cpp raw-reads an ADAPT_CLASS_STRUCT from a pre-adapted-template .a file without neutralizing TempProtos and Config pointer fields before any destructor path. When the legacy engine is selected, classify_use_pre_adapted_templates is enabled, and an attacker can write the output-basename .a file, the success or rejection path can pass file-controlled pointers to ~ADAPT_CLASS_STRUCT and operator delete, causing memory corruption and denial of service. This issue is fixed in version 5.5.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls a crafted `.traineddata` mod
Heap out-of-bounds write and read in Tesseract OCR Engine 5.5.3 and earlier allows an attacker who can supply a crafted
Stack-based buffer overflow in Tesseract OCR 5.5.3 and earlier corrupts the stack during legacy engine initialization, e
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who supplies a crafted .traineddata langu
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls the loaded .traineddata mode
Heap corruption in Tesseract OCR 5.5.3 and earlier allows an attacker who can supply a malicious unicharset file to corr
Out-of-bounds write in Tesseract OCR engine version 5.5.3 and earlier allows an attacker who can supply a crafted `.trai
Denial of service in Tesseract OCR Engine 5.5.3 and earlier allows a local attacker to crash any process that loads a cr
Double free and use-after-free in the Tesseract OCR PAGE XML renderer (5.4.0 through 5.5.3) leaves the caller-owned righ
Heap out-of-bounds write in Tesseract OCR engine prior to 5.5.3 is triggered by a crafted LSTM .traineddata model file t
Heap out-of-bounds read in Tesseract OCR prior to version 5.5.3 allows an attacker who can supply a crafted .traineddata
EUVD-2026-114453
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB