{"id":"CVE-2026-119341","kind":"vulnerability","aliases":["CVE-2026-119341"],"related":[],"title":"Tesseract OCR: crafted template file corrupts memory, crashes the engine","description":"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.","summary":"Tesseract, an open source OCR engine, reads a pre-adapted template (.a) file without validating pointer fields, so a crafted file can trigger invalid memory frees during classification. An attacker who can write that file can cause memory corruption and denial of service.","severity":"unknown","cvss":0.0,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["c++","ocr","package","tesseract"],"not_affected_if":["default-config","no-legacy-engine","untrusted-writes-blocked"],"how_to_check":"- Check the installed Tesseract version with `tesseract --version`; versions before `5.5.4` are in scope.\n- Check whether the legacy engine is used and `classify_use_pre_adapted_templates` is enabled in your configuration.\n- Check whether untrusted users can write to the output-basename `.a` file location.","fix":"- Move to `5.5.4` or later.","status":"open","published_at":"2026-10-30T21:16:52+00:00","first_seen_at":"2026-10-30T21:25:52+00:00","triaged_at":"2026-10-30T21:27:00+00:00","updated_at":"2026-10-30T21:27:00+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-30T21:27:00Z","model":"claude-haiku-5-5","output":{"fix":"- Move to `5.5.4` or later.","reach":"local","title":"Tesseract OCR: crafted template file corrupts memory, crashes the engine","impact":"medium","summary":"Tesseract, an open source OCR engine, reads a pre-adapted template (.a) file without validating pointer fields, so a crafted file can trigger invalid memory frees during classification. An attacker who can write that file can cause memory corruption and denial of service.","audience":"developers","category":"package","nicknames":[],"who_cares":["tesseract","ocr","c++"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"memory corruption and denial of service in the OCR process","analyst_note":"","how_to_check":"- Check the installed Tesseract version with `tesseract --version`; versions before `5.5.4` are in scope.\n- Check whether the legacy engine is used and `classify_use_pre_adapted_templates` is enabled in your configuration.\n- Check whether untrusted users can write to the output-basename `.a` file location.","plain_action":"","needs_analyst":false,"not_affected_if":["default-config","no-legacy-engine","untrusted-writes-blocked"],"who_is_affected":"Only setups that run Tesseract before 5.5.4 with the legacy OCR engine selected and classify_use_pre_adapted_templates enabled, and where an attacker can write the output-basename .a file. Systems using the default LSTM engine or without that setting are not described as exposed by the sources.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000703,"input_tokens":4232,"output_tokens":560,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-119341':13A,16A '-2026':12A,15A '5.5.4':74C,159C 'adapt':31B,82C,89C,113C,140C 'attack':51B,119C 'basenam':125C 'c':17B 'caus':58B,146C 'class':83C,141C 'classif':49B 'classifi':110C 'config':97C 'control':137C 'corrupt':6A,60B,148C 'craft':3A,41B 'crash':8A 'cve':11A,14A 'delet':145C 'denial':62B,150C 'destructor':102C 'enabl':116C 'engin':10A,26B,71C,107C 'field':38B,99C 'file':5A,34B,42B,56B,92C,127C,136C 'file-control':135C 'fix':156C 'free':47B 'invalid':45B 'issu':154C 'legaci':106C 'memori':7A,46B,59B,147C 'neutral':94C 'ocr':2A,18B,25B,70C 'open':23B,68C 'oper':144C 'output':124C 'output-basenam':123C 'packag':19B 'pass':134C 'path':103C,132C 'pointer':37B,98C,138C 'pre':30B,88C,112C 'pre-adapt':29B 'pre-adapted-templ':87C 'prior':72C 'raw':79C 'raw-read':78C 'read':27B,80C 'readadaptedclass':75C 'reject':131C 'select':109C 'servic':64B,152C 'sourc':24B,69C 'src/classify/adaptive.cpp':77C 'struct':84C,142C 'success':129C 'templat':4A,32B,90C,114C 'tempproto':95C 'tesseract':1A,20B,21B,65C 'trigger':44B 'use':111C 'valid':36B 'version':158C 'without':35B,93C 'write':54B,121C","nicknames":[],"mitigations":[],"who_affected":"Only setups that run Tesseract before 5.5.4 with the legacy OCR engine selected and classify_use_pre_adapted_templates enabled, and where an attacker can write the output-basename .a file. Systems using the default LSTM engine or without that setting are not described as exposed by the sources.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T21:16:52+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-119341","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119341","severity":null,"published_at":"2026-10-30T21:16:52+00:00","modified_at":"2026-10-30T21:16:52+00:00","first_seen_at":"2026-10-30T21:25:52+00:00","fetched_at":"2026-10-30T21:25:52+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}