{"id":"CVE-2026-119338","kind":"vulnerability","aliases":["CVE-2026-119338"],"related":[],"title":"Tesseract OCR: crafted Hebrew or Arabic page triggers memory corruption","description":"Tesseract is an open source OCR engine. From 5.4.0 until 5.5.4, AppendLinePolygon in src/api/pagerenderer.cpp destroys the caller-owned right-to-left Pta accumulator while receiving it by value, leaving line_top_rtl_pts and line_bottom_rtl_pts dangling. On an upright Hebrew or Arabic page at the default PAGE XML level, POLYGONFLAG with a false skewed_flag enters the vulnerable calls, while LEVELFLAG greater than zero provides an alternative gate. The calls repeatedly read and free the stale object, causing a double free and use after free and allowing corrupted coordinates to reach RecalcPolygonline. This issue is fixed in version 5.5.4.","summary":"Tesseract is an open source OCR engine used to read text from images. A crafted upright Hebrew or Arabic page can trigger a double free and use after free during PAGE XML output, which can corrupt memory and may let an attacker run code.","severity":"medium","cvss":6.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["document-processing","ocr","package","self-hosted","tesseract"],"not_affected_if":["latin-script-only","plain-text-output","versions-5.5.4-and-above","versions-below-5.4.0"],"how_to_check":"- Check the installed Tesseract version with `tesseract --version`; versions from 5.4.0 up to but not including 5.5.4 are affected.\n- Check whether your pipeline runs Tesseract with PAGE XML output (the POLYGONFLAG or LEVELFLAG settings) on right-to-left Hebrew or Arabic pages.","fix":"- Tesseract: upgrade to `5.5.4`","status":"open","published_at":"2026-10-30T21:16:51+00:00","first_seen_at":"2026-10-30T21:25:52+00:00","triaged_at":"2026-10-30T21:26:47+00:00","updated_at":"2026-10-30T21:26:47+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-30T21:26:47Z","model":"claude-haiku-5-5","output":{"fix":"- Tesseract: upgrade to `5.5.4`","reach":"unknown","title":"Tesseract OCR: crafted Hebrew or Arabic page triggers memory corruption","impact":"high","summary":"Tesseract is an open source OCR engine used to read text from images. A crafted upright Hebrew or Arabic page can trigger a double free and use after free during PAGE XML output, which can corrupt memory and may let an attacker run code.","audience":"developers","category":"package","nicknames":[],"who_cares":["tesseract","ocr","document-processing","self-hosted"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"memory corruption while processing a crafted page, possibly code execution","analyst_note":"Confirm whether the sources support remote exploitation and the real impact (memory corruption versus code execution) beyond the NVD description.","how_to_check":"- Check the installed Tesseract version with `tesseract --version`; versions from 5.4.0 up to but not including 5.5.4 are affected.\n- Check whether your pipeline runs Tesseract with PAGE XML output (the POLYGONFLAG or LEVELFLAG settings) on right-to-left Hebrew or Arabic pages.","plain_action":"","needs_analyst":true,"not_affected_if":["versions-below-5.4.0","versions-5.5.4-and-above","latin-script-only","plain-text-output"],"who_is_affected":"Only deployments running Tesseract 5.4.0 through 5.5.4 that process upright Hebrew or Arabic pages and emit PAGE XML output with polygon or level flags enabled. Services that only run Tesseract on Latin-script text or plain text output are less exposed. Whether a crafted input can reach code execution is not stated in the sources.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000757,"input_tokens":4260,"output_tokens":661,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-119338':13A,16A '-2026':12A,15A '5.4.0':78C '5.5.4':80C,173C 'accumul':94C 'allow':161C 'altern':141C 'appendlinepolygon':81C 'arab':6A,44B,116C 'attack':67B 'bottom':107C 'call':133C,144C 'caller':87C 'caller-own':86C 'caus':152C 'code':69B 'coordin':163C 'corrupt':10A,61B,162C 'craft':3A,40B 'cve':11A,14A 'dangl':110C 'default':120C 'destroy':84C 'document':18B 'document-process':17B 'doubl':49B,154C 'engin':32B,76C 'enter':130C 'fals':127C 'fix':170C 'flag':129C 'free':50B,54B,148C,155C,159C 'gate':142C 'greater':136C 'hebrew':4A,42B,114C 'host':24B 'imag':38B 'issu':168C 'leav':100C 'left':92C 'let':65B 'level':123C 'levelflag':135C 'line':101C,106C 'may':64B 'memori':9A,62B 'object':151C 'ocr':2A,20B,31B,75C 'open':29B,73C 'output':58B 'own':88C 'packag':21B 'page':7A,45B,56B,117C,121C 'polygonflag':124C 'process':19B 'provid':139C 'pta':93C 'pts':104C,109C 'reach':165C 'read':35B,146C 'recalcpolygonlin':166C 'receiv':96C 'repeat':145C 'right':90C 'right-to-left':89C 'rtl':103C,108C 'run':68B 'self':23B 'self-host':22B 'skew':128C 'sourc':30B,74C 'src/api/pagerenderer.cpp':83C 'stale':150C 'tesseract':1A,25B,26B,70C 'text':36B 'top':102C 'trigger':8A,47B 'upright':41B,113C 'use':33B,52B,157C 'valu':99C 'version':172C 'vulner':132C 'xml':57B,122C 'zero':138C","nicknames":[],"mitigations":[],"who_affected":"Only deployments running Tesseract 5.4.0 through 5.5.4 that process upright Hebrew or Arabic pages and emit PAGE XML output with polygon or level flags enabled. Services that only run Tesseract on Latin-script text or plain text output are less exposed. Whether a crafted input can reach code execution is not stated in the sources.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T21:16:51+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-119338","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119338","severity":null,"published_at":"2026-10-30T21:16:51+00:00","modified_at":"2026-10-30T21:16:51+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"}