{"vuln_id":"CVE-2026-62947","aliases":["GHSA-jw5r-xhf5-2xcq"],"description":"ACL bypass and arbitrary root file read via cgi-io cgi-download","published_at":"2026-06-29T22:56:04Z","modified_at":"2026-07-14T22:50:30Z","first_seen_at":"2026-11-22T13:40:33.558965Z","severity":"medium","severity_source":"ghsa","cvss_score":4.9,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","cwe":["CWE-22"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00524,"epss_percentile":0.45273,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-62947"},"matched_alias":null,"items":[{"id":12266,"source":{"id":"gh-openwrt","name":"OpenWrt releases + advisories (GitHub openwrt/openwrt tags)"},"title":"GHSA-jw5r-xhf5-2xcq / CVE-2026-62947: ACL bypass and arbitrary root file read via cgi-io cgi-download","summary":"ACL bypass and arbitrary root file read via cgi-io cgi-download ## Summary The `cgi-download` handler in cgi-io authorizes the requested `path` against the caller's ubus session `file` ACL and then opens it without canonicalizing the path first (`main.c:540`, `main.c:557`). rpcd's ACL matcher uses `fnmatch()` without `FNM_PATHNAME` (`session.c:146`), so a wildcard in an allowed ACL glob spans `/`. A request path of the form `/../../../` matches the literal allowed prefix during the ACL check, while the subsequent `open()` lets the kernel resolve the embedded `..` and reach a file outside that prefix. cgi-io runs as root, so the resolved target is any file readable by uid 0. The sibling upload handler and rpcd-mod-file both canonicalize before their ACL check and reject the same input. Result: a session holding the `cgi-io download` permission and any wildcard `file` read grant reads any root-readable file, including `/etc/shadow`, which the rpcd file API denies to that same session. ## Affected OpenWrt cgi-io, git HEAD `658b14b`, as shipped in OpenWrt 25.12.4 (r32933-4ccb782af7). `/www/cgi-bin/cgi-download` is a symlink to `/usr/libexec/cgi-io`. Requires an authenticated ubus session holding `cgi-io download` (access group `luci-mod-system-flash`) plus one wildcard `file` read grant: `luci-mod-system-repokeys` (`/etc/apk/keys/*`), `luci-mod-network-config` (`/proc/sys/net/ipv[46]/conf/*`), or `luci-mod-system-flash` itself (`/dev/mtdblock[0-9]*`). On a default single-root install the root LuCI session holds these grants. Deployments that delegate a restricted rpcd `config login` operator the flash access group are affected at a lower privilege tier. Unauthenticated requests are rejected at `main.c:537`; the read is not anonymously reachable. ## Root cause `main_download` reads the `path` POST field and passes it unmodified to `session_access(sid, \"file\", fields[3], \"read\")` (`main.c:540`) and then to `open(fields[3], O_RDONLY)` (`main.c:557`). rpcd evaluates the ACL with `fnmatch(acl->object, path, FNM_NOESCAPE)` (`session.c:146`), and the missing `FNM_PATHNAME` lets a `*` in an allowed glob match `/` and therefore an entire `../` traversal suffix. Because the ACL string and the `open()` string are the same raw bytes, the check passes against the allowed prefix while the kernel resolves the `..` to a file outside it. The upload handler canonicalizes with `canonicalize_path()` before its ACL check (`main.c:372`, `main.c:348`), and rpcd-mod-file canonicalizes at `file.c:264` before `rpc_file_access` at `file.c:272`, so both reject the identical traversal. cgi-io runs as root, so the missing canonicalization on the download path turns a path-scoped read grant into a read of any uid-0-readable file. ## Reproduction `openwrt/rootfs:x86_64-25.12.4` in Docker running uhttpd, ubusd, rpcd, rpcd-mod-file and LuCI, with a root password set and stock ACLs. The session below is a restricted operator holding only `luci-mod-system-flash` and `luci-mod-system-repokeys`. Affected packages: :cgi-io (OpenWrt)","url":"https://github.com/openwrt/openwrt/security/advisories/GHSA-jw5r-xhf5-2xcq","published_at":"2026-06-29T22:56:04Z","updated_at":"2026-07-14T22:50:30Z","fetched_at":"2026-11-22T13:40:33.544622Z","severity":"medium","cvss_score":4.9,"epss":0.00524,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"openwrt","product":"cgi-io (OpenWrt)","vuln_id":"CVE-2026-62947","vuln_ids":["CVE-2026-62947","GHSA-JW5R-XHF5-2XCQ"],"tags":["repo-advisory","","CWE-22","security","repo:openwrt/openwrt"],"cluster_id":11484,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12266","html":"https://vulnwatch.ve1ve2.com/item/12266"}}]}