# CVE-2026-119338: Tesseract: Double free and use after free in the PAGE XML renderer on right-to-left pages

Status: published. Published: 2026-10-30. Updated: 2026-11-05.

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.

## Remediation

- fix: tesseract (other): GitHub reports patched versions 5.5.4. Check the advisory for the affected release branch. (source: GitHub GHSA-vf7v-2h4f-6f4j) — https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j

## Affected products and versions

- tesseract-ocr / tesseract: >= 5.4.0, < 5.5.4 (affected). Source: CNA: GitHub_M
-  / tesseract (tesseract): >= 5.4.0, <= 5.5.3 (affected, GitHub advisory range). Source: GitHub GHSA-vf7v-2h4f-6f4j

## Severity and prioritization

- CVSS 4.0: 6.9 (medium); 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; source: CNA: GitHub_M

- CVSS 4.0: 6.9 (medium); 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; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 0.14% as of 2026-11-04; percentile 3.21%

- SSVC: exploitation poc; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-125, CWE-415, CWE-416

## Exploit evidence

- exploit: https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j (ADP: CISA-ADP)

## References

- https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/tesseract-ocr/tesseract/pull/4647 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/tesseract-ocr/tesseract/commit/fa52414ff1fd13ae4b00048d2498f9141b0bc2eb (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j (ADP: CISA-ADP; exploit)

- https://github.com/tesseract-ocr/tesseract/commit/fa52414ff1fd13ae4b00048d2498f9141b0bc2eb (security-advisories@github.com)

- https://github.com/tesseract-ocr/tesseract/pull/4647 (security-advisories@github.com)

- https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4 (security-advisories@github.com)

- https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j (security-advisories@github.com)

- https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j (GitHub Security Advisories; advisory)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-119338; retrieved 2026-11-05; source updated 2026-11-05

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-119338; retrieved 2026-11-03; source updated 2026-11-02

- GitHub Security Advisories: https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-vf7v-2h4f-6f4j; retrieved 2026-11-03; source updated 2026-10-30

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-119338; retrieved 2026-11-05; source updated Not reported

Revision: 619d4854c502b22df858ac287d12b35b43b4e34f9bdbcbe1083290c7010aa2f8

Canonical: https://y2.dev/cve/CVE-2026-119338

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.