VulnWatch by ve1ve2
critical 9.3 EPSS 0.51%

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

Source:
OSV.dev
Published:
Fetched:
Updated:
Affects:
php jane-php/open-api-3

https://osv.dev/vulnerability/GHSA-q8v2-3j4h-xg2p ↗

osvpackagistfix-available

Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3) ### 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 query parameter name verbatim in a `@param array{ " "?: ... }` 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 following PHP survive. Injecting `*/ public function __construct(){ } /*` 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 `*/`. [maintainer-report.txt](https://github.com/user-attachments/files/29497099/maintainer-report.txt) [reproduce.sh](https://github.com/user-attachments/files/29497102/reproduce.sh) [gen.php](https://github.com/user-attachments/files/29497103/gen.php) [make_spec.py](https://github.com/user-attachments/files/29497104/make_spec.py) Affected: Packagist:jane-php/open-api-3 Fixed in: 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

Linked vulnerabilities (2)

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

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

CWE: CWE-94, CWE-95, CWE-116Aliases: CVE-2026-63412
CVE-2026-63412 critical 9.3 EPSS 0.51% (p44) NVDCVE.orgGHSA
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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

CWE: CWE-94, CWE-95, CWE-116Aliases: GHSA-q8v2-3j4h-xg2pNVD: Received

Also reported by (1)