GHSA-X9XR-53QX-9QCF
Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-X9XR-53QX-9QCF divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### 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 `*/`.
maintainer-report.txt https://github.com/user-attachments/files/29497253/maintainer-report.txt
reproduce.sh https://github.com/user-attachments/files/29497254/reproduce.sh
gen.php https://github.com/user-attachments/files/29497255/gen.php
make_spec.py https://github.com/user-attachments/files/29497256/make_spec.py
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistjane-php/open-api-3 |
Corregida | 7.12.0 | — | — |
7.12.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://nvd.nist.gov/vuln/detail/CVE-2026-63413https://github.com/janephp/janephp/security/advisories/GHSA-x9xr-53qx-9qcfhttps://github.com/janephp/janephp/pull/960https://github.com/janephp/janephp/commit/0ea379deab5689475d62653b408de62ad3611c7ahttps://github.com/janephp/janephphttps://github.com/janephp/janephp/releases/tag/v7.12.0Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
