CRITICAL · CVSS 4.0 EPSS 0.5% · 41th percentile CWE-94

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

Published 2026-11-19 · Updated 2026-11-19 · Also known as GHSA-x9xr-53qx-9qcf

Summary

The jane-php/open-api-3 package contains a critical code injection vulnerability where unchecked header parameter names allow an attacker to break out of PHPDoc comments during code generation. Engineering teams using this library to generate SDKs from untrusted OpenAPI specifications must upgrade to version 7.12.0 or later.

Who is affected

This vulnerability allows for Remote Code Execution (RCE) when an application generates a client SDK using a malicious OpenAPI definition. By injecting a payload into a header parameter name, an attacker can prematurely close a PHPDoc block and inject arbitrary PHP methods into the generated client class, which then execute upon class instantiation.

Exploitability

The vulnerability is rated CRITICAL with a CVSS 4.0 vector indicating no special access or interaction requirements and low attack complexity. While the EPSS score is currently low at 0.003, the flaw allows for direct code execution, and it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-20. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Packagist jane-php/open-api-3 >= 0, < 7.12.0 7.12.0 composer require "jane-php/open-api-3:>=7.12.0"

CVSS 4.0 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

Attack vectorNetwork
Attack complexityLow
Attack requirementsNone
Privileges requiredNone
User interactionNone
Confidentiality (vulnerable system)High
Integrity (vulnerable system)High
Availability (vulnerable system)High
Confidentiality (subsequent systems)None
Integrity (subsequent systems)None
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What is the root cause of the RCE?

The generator incorrectly emits header parameter names directly into PHPDoc blocks without escaping the '*/' sequence, allowing an attacker to escape the comment block and inject arbitrary PHP code into the generated class.

Does this impact all users of jane-php?

Only users who generate SDKs from OpenAPI specifications that are influenced by external or untrusted parties are at risk of this injection attack.

Is this vulnerability actively being exploited?

There is no evidence of active exploitation documented in the CISA Known Exploited Vulnerabilities catalog.

Original advisory description
### 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)

References

Source records: GHSA-x9xr-53qx-9qcf (OSV.dev) · EPSS by FIRST, 2026-11-22.