Skip to content
← Blog · · df00tech

Jane: PHPDoc Comment-Break Lets Attacker-Controlled OpenAPI Specs Inject PHP into Generated SDKs (CVE-2026-63413)

breaking ghsa composer CVE-2026-63413

What happened

A GitHub security advisory (GHSA-x9xr-53qx-9qcf) reports a code injection vulnerability in jane-php/open-api-3, a PHP library that generates SDK client code from OpenAPI specifications. According to the report, Jane uses nikic/php-parser to build the generated PHP code's AST, which escapes string literals. The PHPDoc comment text attached to generated methods is emitted raw. Generated Client and Endpoint methods embed header parameter names verbatim inside a @param array{...} PHPDoc block. Because a header name can contain */, an attacker-controlled OpenAPI document can close the PHPDoc comment early and inject arbitrary PHP. This includes an attacker-defined __construct() method on the generated Client class. That code executes whenever the generated client is instantiated. The report states this was verified against version 7.11.2 on PHP 8.1, with a public proof-of-concept (reproduce.sh, make_spec.py, gen.php) demonstrating the full chain from spec to code execution.

Why it matters

This is tracked as CVE-2026-63413 and mapped to CWE-94 (code injection). The risk is specific but realistic. Any workflow that generates a Jane client from an OpenAPI document an attacker can influence, such as third-party API specs, user-submitted specs, or CI pipelines that regenerate SDKs from remote sources, can result in arbitrary PHP execution. The report notes the malicious code runs when the generated client is instantiated, which most applications do on every API call, not just at generation time. This makes exploitation low-friction once a poisoned spec reaches the generation step.

What defenders should watch for

  • Inventory where jane-php/open-api-3 is used to generate SDKs, especially in CI/CD or build pipelines that pull OpenAPI specs from external, third-party, or user-controlled sources.
  • Treat any OpenAPI spec from an untrusted or semi-trusted source as executable input until the fix is applied. Do not auto-generate and deploy clients from specs you have not reviewed.
  • Review generated Client and Endpoint source for unexpected __construct() methods or docblocks that do not match the expected parameter list, as a sign of prior exploitation.
  • Audit header parameter names in any OpenAPI specs already ingested for the sequence */, which is the breakout trigger described in the advisory.
  • Apply the maintainer's suggested mitigation of neutralizing */ in all generated PHPDoc text (parameter names and descriptions) once a patched release is available, and prioritize upgrading if you regenerate clients on a recurring schedule.

Developing intel

This is a same-day GitHub Security Advisory with a public proof-of-concept and no CVSS score assigned at the time of writing. Exploit status is listed as PoC-public. Details may evolve as the maintainers respond and a patch lands. For the full technical write-up and PoC materials, see the original advisory: GHSA-x9xr-53qx-9qcf.

Get new detections in your inbox

New ATT&CK coverage plus CISA KEV / CVE detection rules, roughly weekly. No spam, unsubscribe anytime.