GHSA-Q8V2-3J4H-XG2P

Vulnerability from github – Published: 2026-11-19 16:18 – Updated: 2026-11-19 16:18
VLAI
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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "jane-php/open-api-3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "7.12.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-63412"
  ],
  "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"
  },
  "details": "### Summary\njane-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{ \"\u003cname\u003e\"?: ... }` 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(){ \u003ccode\u003e } /*` adds an attacker-controlled __construct to the generated Client class, which runs when the client is instantiated -\u003e RCE (CWE-94). Verified 7.11.2/PHP8.1.\n\n### Impact\nGenerating 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.\n\n### PoC\n`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.\n\n### Suggested fix\nNeutralize `*/` (e.g. `*/`-\u003e`* /`) in all generated PHPDoc text (parameter names, descriptions). Regression-test with a parameter name/description containing `*/`.\n\n[maintainer-report.txt](https://github.com/user-attachments/files/29497099/maintainer-report.txt)\n[reproduce.sh](https://github.com/user-attachments/files/29497102/reproduce.sh)\n[gen.php](https://github.com/user-attachments/files/29497103/gen.php)\n[make_spec.py](https://github.com/user-attachments/files/29497104/make_spec.py)",
  "id": "GHSA-q8v2-3j4h-xg2p",
  "modified": "2026-11-19T16:18:45Z",
  "published": "2026-11-19T16:18:45Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/janephp/janephp/security/advisories/GHSA-q8v2-3j4h-xg2p"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63412"
    },
    {
      "type": "WEB",
      "url": "https://github.com/janephp/janephp/pull/960"
    },
    {
      "type": "WEB",
      "url": "https://github.com/janephp/janephp/commit/0ea379deab5689475d62653b408de62ad3611c7a"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/janephp/janephp"
    },
    {
      "type": "WEB",
      "url": "https://github.com/janephp/janephp/releases/tag/v7.12.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Jane: Instantiation RCE via query parameter name -\u003e raw PHPDoc */ breakout (jane-php/open-api-3)"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…