Summary
Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
Advisory details
Summary
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 following PHP survive. Injecting */ public function __construct(){ <code> } /* adds an attacker-controlled __construct to the generated Client class, which runs when the client is instantiated -> RCE (CWE-94). Verified 7.11.2/PHP8.1.
Impact
Generating a client from an attacker-influenced OpenAPI document and using the generated SDK (instantiating the client, which apps do on every call) runs attacker PHP. CWE-94/95/116.
PoC
reproduce.sh (+ make_spec.py, gen.php): scaffolds a composer project with jane-php/open-api-3, generates, instantiates the generated Client, shows the marker.
Suggested fix
Neutralize */ (e.g. */->* /) in all generated PHPDoc text (parameter names, descriptions). Regression-test with a parameter name/description containing */.
References
- https://github.com/advisories/GHSA-x9xr-53qx-9qcf
- https://github.com/janephp/janephp/security/advisories/GHSA-x9xr-53qx-9qcf
- https://nvd.nist.gov/vuln/detail/CVE-2026-63413
- https://github.com/janephp/janephp/pull/960
- https://github.com/janephp/janephp/commit/0ea379deab5689475d62653b408de62ad3611c7a
- https://github.com/janephp/janephp/releases/tag/v7.12.0
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-104883
contao/core-bundle: Non-admin users can self-grant permissions that implicitly make them administrators
- CRITICALCVE-2026-63344
Refitter allows arbitrary code execution through unescaped OpenAPI content-type values
- CRITICALCVE-2026-63346
Refitter allows code execution through unescaped OpenAPI header parameter names
- CRITICALCVE-2026-63345
Refitter allows arbitrary code execution through unescaped OpenAPI paths
- MEDIUMGHSA-4rj4-rcrq-gr92
Safari MCP: JavaScript injection through single-quoted tool arguments (backslash not escaped)
- HIGHCVE-2026-76090
Tapir: Construction/decode RCE via property name -> raw case-class field (tapir-openapi-codegen)