Skip to content
← Blog · · df00tech

RCE in jane-php Client Generators via PHPDoc Comment Injection (CVE-2026-63411)

breaking ghsa composer CVE-2026-63411

A new GitHub Security Advisory (GHSA-xwcw-j52r-34x4, CVE-2026-63411) discloses a remote code execution flaw in jane-php/open-api-3, the code generator that produces PHP API clients from OpenAPI specifications.

What was reported

According to the advisory, jane-php uses nikic/php-parser to build its generated PHP via an AST. This escapes string literals properly. PHPDoc comment text, however, is emitted raw. Generated Client and Endpoint methods embed the OpenAPI parameter description verbatim inside a @param array{"<name>"?: ...} docblock. A parameter description can contain */. An attacker-controlled OpenAPI document can use this to close the docblock early and inject arbitrary PHP, including a malicious __construct() method on the generated Client class. That code runs the moment the generated client is instantiated. The reporter verified this against version 7.11.2 on PHP 8.1 and published a proof-of-concept scaffold. The maintainer-suggested fix is to neutralize */ sequences in all generated PHPDoc text.

Why it matters for defenders

This is not a runtime input-validation bug. It is a code-generation-time injection. Any workflow that generates a jane-php client from an OpenAPI spec that is not fully trusted, such as specs pulled from third-party vendors or partner APIs, can end up with a poisoned Client class checked into source or built in CI. The payload fires on instantiation, which applications do on effectively every API call, so exploitation needs no further attacker interaction once the tainted client exists. Organizations building SDKs programmatically from external OpenAPI documents, including in CI/CD pipelines, are the most exposed.

What defenders should do now

  • Inventory any build or CI pipelines that run jane-php's open-api-3 generator against OpenAPI specs sourced from outside your organization.
  • Treat OpenAPI specifications from third parties as untrusted input until jane-php ships a fix. Review specs for parameter descriptions containing */ or PHP code fragments before generating clients from them.
  • Audit previously generated Client and Endpoint PHP files for unexpected methods, such as an injected __construct, or raw */ sequences inside docblocks that do not match the original spec text.
  • Pin or review the jane-php/open-api-3 version in use and watch for a patched release that neutralizes */ in generated PHPDoc output.
  • As a stopgap, run client generation in an isolated, disposable build environment rather than in environments with broader access.

This is same-day intel based on a freshly published GHSA with a public proof-of-concept. No official patch version is confirmed in the advisory text at this time. Track the original report for updates: GHSA-xwcw-j52r-34x4.

Get new detections in your inbox

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