GHSA-q8v2-3j4h-xg2p

Suggest an improvement
Source
https://github.com/advisories/GHSA-q8v2-3j4h-xg2p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-q8v2-3j4h-xg2p/GHSA-q8v2-3j4h-xg2p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-q8v2-3j4h-xg2p
Aliases
Published
2026-11-19T16:18:45Z
Modified
2026-11-19T16:30:05Z
Severity
  • 9.3 (Critical) CVSS_V4 - 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 CVSS Calculator
Summary
Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
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

Database specific
{
    "cwe_ids": [
        "CWE-116",
        "CWE-94",
        "CWE-95"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-19T16:18:45Z",
    "nvd_published_at": "2026-11-18T22:17:22Z",
    "severity": "CRITICAL"
}
References

Affected packages

Packagist / jane-php/open-api-3

Package

Name
jane-php/open-api-3
Purl
pkg:composer/jane-php/open-api-3

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
7.12.0

Affected versions

v5.*
v5.3.0
v5.3.1
v5.3.2
v5.3.3
v6.*
v6.0.0
v6.0.1
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.1.0
v6.1.1
v6.2.0
v6.2.1
v6.2.2
v6.2.3
v6.2.4
v6.2.5
v6.3.0
v6.3.1
v6.3.2
v6.3.3
v6.3.4
v6.3.5
v6.3.6
v6.3.7
v6.3.8
v6.3.9
v7.*
v7.0.0
v7.1.0
v7.1.1
v7.1.2
v7.1.3
v7.1.4
v7.1.5
v7.1.6
v7.1.7
v7.2.0
v7.2.1
v7.2.2
v7.2.3
v7.2.4
v7.2.5
v7.3.0
v7.3.1
v7.4.0
v7.4.1
v7.4.2
v7.4.3
v7.4.4
v7.5.0
v7.5.1
v7.5.2
v7.5.3
v7.5.4
v7.5.5
v7.6.0
v7.6.1
v7.6.2
v7.7.0
v7.8.0
v7.8.1
v7.9.0
v7.10.0
v7.10.1
v7.10.2
v7.10.3
v7.10.4
v7.11.0
v7.11.1
v7.11.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-q8v2-3j4h-xg2p/GHSA-q8v2-3j4h-xg2p.json"