Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
Summary
jane-php (open-api-3) builds PHP code using nikic/php-parser (AST), ensuring string literals are escaped; however, PHPDoc comment text is emitted raw. The generated Client and Endpoint method docblocks embed the query parameter name verbatim in a @param array{ "<name>"?: ... } block. A */ sequence within the query parameter name terminates the /** ... */ docblock early and places the remaining content in a class-body position. Because the parameter name is treated as a raw string key rather than being identifier-mangled, the */ and subsequent PHP code persist. Injecting */ public function __construct(){ <code> } /* adds an attacker-controlled __construct method to the generated Client class, which executes whenever the client is instantiated, leading to remote code execution (CWE-94). This behavior has been verified on 7.11.2/PHP8.1.
Impact
Generating a client from an attacker-influenced OpenAPI document and using the resulting SDK (by instantiating the client, which applications perform on every call) executes attacker-supplied PHP code. This impacts CWE-94/95/116.
Proof of Concept
reproduce.sh (+ make_spec.py, gen.php): Scaffolds a Composer project with jane-php/open-api-3, generates the SDK, instantiates the generated Client, and displays the marker.
Suggested Fix
Neutralize */ (for example, */->* /) across all generated PHPDoc text, including parameter names and descriptions. Add regression tests using parameter names or descriptions containing */.
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-q8v2-3j4h-xg2p
- https://nvd.nist.gov/vuln/detail/CVE-2026-63412
- https://github.com/janephp/janephp/pull/960
- https://github.com/janephp/janephp/commit/0ea379deab5689475d62653b408de62ad3611c7a
- 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:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-116, CWE-94, CWE-95- Platform
- Composer
- Package
jane-php/open-api-3- Disclosed
- 19.11.2026
- Updated
- 20.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-q8v2-3j4h-xg2p - 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: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3) 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.