Skip to content
Security advisoryCVE-2026-63412

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

Critical9.3Published Modified Original advisory

As published by the sources

Affected packages

  • jane-php/open-api-3
    Affected<7.12.0
    Fixed in7.12.0

Derived from the fixed versions above

What to do

  1. Upgrade jane-php/open-api-3 to 7.12.0 or later.

    composer update jane-php/open-api-3 --with-dependencies

To see which version you have installed, run composer show vendor/package. Running composer audit lists the known advisories that match your installed versions.

Quoted from the original 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 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 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 reproduce.sh gen.php make_spec.py

References

laravel.now is an independent community project. It is not affiliated with, endorsed by, sponsored by, or in any way officially connected to Laravel, Laravel LLC, Taylor Otwell, or the Laravel framework maintainers. Laravel is a trademark of Taylor Otwell. All other trademarks belong to their respective owners.

This site is operated by the makers of Lockhound. Links to Lockhound are promotional.