{"id":"CVE-2026-119340","kind":"vulnerability","aliases":["CVE-2026-119340"],"related":[],"title":"Tesseract OCR: crafted traineddata file can crash or corrupt memory","description":"Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negative dimensions or a 65535 by 65535 product can create inconsistent allocation state and later out-of-bounds accesses while loading a crafted traineddata file, causing denial of service. This issue is fixed in version 5.5.4.","summary":"Tesseract, an open source OCR engine, fails to validate matrix dimensions when loading a traineddata file, so negative or oversized values lead to inconsistent allocation and out-of-bounds access. An attacker who supplies a crafted traineddata file can cause a denial of service.","severity":"medium","cvss":5.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["node","ocr","package","python","self-hosted","tesseract"],"not_affected_if":["trusted-traineddata-only","version-5.5.4-or-later"],"how_to_check":"- Run `tesseract --version` to see which Tesseract version is installed.\n- Check whether your build of Tesseract loads traineddata files from untrusted sources.","fix":"- Move Tesseract 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:26:55+00:00","updated_at":"2026-10-30T21:26:55+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-30T21:26:55Z","model":"claude-haiku-5-5","output":{"fix":"- Move Tesseract to `5.5.4` or later.","reach":"unknown","title":"Tesseract OCR: crafted traineddata file can crash or corrupt memory","impact":"low","summary":"Tesseract, an open source OCR engine, fails to validate matrix dimensions when loading a traineddata file, so negative or oversized values lead to inconsistent allocation and out-of-bounds access. An attacker who supplies a crafted traineddata file can cause a denial of service.","audience":"developers","category":"package","nicknames":[],"who_cares":["tesseract","ocr","python","node","self-hosted"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"Tesseract process crashes or misbehaves while loading a crafted file","analyst_note":"","how_to_check":"- Run `tesseract --version` to see which Tesseract version is installed.\n- Check whether your build of Tesseract loads traineddata files from untrusted sources.","plain_action":"","needs_analyst":false,"not_affected_if":["version-5.5.4-or-later","trusted-traineddata-only"],"who_is_affected":"Teams that load traineddata language files into Tesseract, especially files from untrusted sources, are exposed on versions before 5.5.4. Systems that only use trusted, bundled language data are lower risk. The sources do not say which downstream packages bundle Tesseract.","user_interaction":"unknown","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000683,"input_tokens":4193,"output_tokens":527,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-119340':13A,16A '-2026':12A,15A '2d':81C '5.5.4':79C,143C '65535':111C,113C 'access':55B,126C 'alloc':49B,118C 'allow':101C 'array':82C 'attack':57B 'bound':54B,125C 'caus':65B,133C 'compar':95C 'corrupt':9A 'craft':3A,61B,130C 'crash':7A 'creat':116C 'cve':11A,14A 'denial':67B,134C 'deserializes':83C 'dimens':35B,88C,108C 'engin':30B,76C 'fail':31B 'file':5A,40B,63B,132C 'fix':140C 'generic':80C 'host':23B 'inconsist':48B,117C 'int32':91C 'issu':138C 'later':121C 'lead':46B 'load':37B,128C 'matrix':34B,87C 'max':100C 'memori':10A 'negat':42B,102C,107C 'node':17B 'ocr':2A,18B,29B,75C 'open':27B,73C 'out-of-bound':51B,122C 'overs':44B 'packag':19B 'prior':77C 'product':114C 'python':20B 'reach':105C 'read':86C 'resizenoinit':106C 'self':22B 'self-host':21B 'servic':69B,136C 'sign':90C 'sourc':28B,74C 'src/ccstruct/matrix.h':85C 'state':119C 'suppli':59B 'tesseract':1A,24B,25B,70C 'traineddata':4A,39B,62B,131C 'uint16':99C 'valid':33B 'valu':45B,93C,103C 'version':142C","nicknames":[],"mitigations":[],"who_affected":"Teams that load traineddata language files into Tesseract, especially files from untrusted sources, are exposed on versions before 5.5.4. Systems that only use trusted, bundled language data are lower risk. The sources do not say which downstream packages bundle Tesseract.","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:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-119340","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119340","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"}