On this page (8 sections)

A critical code injection flaw, tracked as CVE-2026-63411, affects the open-api-3 generator in the Jane PHP libraries. The generator copies OpenAPI parameter descriptions into the comments of the PHP client it writes, and a crafted description can break out of that comment and place attacker-chosen PHP in the generated class. The maintainers fixed it in version 7.12.0.

If your team generates PHP API clients from OpenAPI documents you do not fully control, such as a partner's or vendor's spec, this is worth checking today. Teams that only use hand-written specs are far less exposed, but should still upgrade.

What happened

Jane is a set of PHP libraries that generates models and API clients from JSON Schema and OpenAPI specifications. According to the GitHub advisory, the open-api-3 generator builds its PHP through the nikic/php-parser syntax tree, so string literals are escaped properly. The comment text is a different story: PHPDoc comments are written out raw.

The generated Client and Endpoint method docblocks embed each parameter description verbatim. A description that contains the comment-closing delimiter ends the docblock early, and whatever follows is parsed as real PHP in the class body. The advisory says this can add an attacker-controlled constructor to the generated Client class, which runs when the client is instantiated. The record was published to the National Vulnerability Database on November 18, 2026 and to the GitHub Advisory Database on November 19, 2026.

Why this class of bug is easy to miss

Code generators sit in an unusual trust position. Developers tend to treat an OpenAPI file as data, but the generator turns that data into executable source. Any field that reaches the output without proper encoding for its context becomes a possible injection point. Here the context was a comment, and the encoding gap was a single delimiter sequence.

The weakness is classified as CWE-94 and CWE-95 (code injection) and CWE-116 (improper encoding or escaping of output). The injected code does not run during generation. It runs later, when your application instantiates the generated client, which the advisory notes apps do on every call. That delay makes the problem easy to overlook in review, because the malicious change lives inside generated files that few people read closely.

Who is realistically exposed

The advisory states that exploitation requires generating a client from an attacker-influenced OpenAPI document and then using the generated SDK. The injected PHP then runs with the consuming application's privileges. The CVSS metrics list the attack vector as network with no privileges and no user interaction, but in practice the attacker needs a way to get a malicious spec in front of your generator.

That makes these setups the most relevant:

  • Build pipelines that pull OpenAPI documents from a vendor, partner or public registry and regenerate clients automatically.
  • Projects that accept specs from customers or contributors, such as integration platforms or SDK-as-a-service tools.
  • Teams that regenerate clients from a URL rather than from a pinned, reviewed copy of the spec.
  • Shared or internal specs that many people can edit without review.

If your specs are written in-house, reviewed, and stored in your own repository, the practical risk is lower. It is not zero, because an insider or a compromised account could still modify a spec.

How to check if you are affected

First find out whether the package is installed and which version you have. This read-only Composer command prints the installed version of the package. Run it from the project root. A version below 7.12.0 is affected.

Show the installed jane-php/open-api-3 version (run in your project root)Shell
composer show jane-php/open-api-3

If the command reports the package is not installed, check whether it is pulled in indirectly. This read-only command lists which packages require it.

See what depends on jane-php/open-api-3Shell
composer why jane-php/open-api-3

Next, work out which clients were generated by a vulnerable version and from which specs. The advisory says the vulnerability was verified on 7.11.2 with PHP 8.1, and the fixed release is 7.12.0, so treat everything generated with an earlier version as suspect when the spec came from a source you do not control.

What to do now

  1. Upgrade jane-php/open-api-3 to 7.12.0 or later in every project and build environment, including CI images and developer machines.
  2. Regenerate all clients from your specs using the fixed version, then replace the previously generated files.
  3. Review the OpenAPI documents used for generation. Identify any that came from third parties or that many people can edit.
  4. Inspect previously generated Client and Endpoint files for unexpected methods, especially a constructor you did not expect, or code that sits outside method bodies.
  5. Pin specs to a reviewed copy in version control instead of fetching them live during builds.
  6. Run generation in an isolated build environment with no production credentials until you have upgraded.
  7. If you find injected code in a generated client that was deployed, treat it as a compromise: follow your incident process, rotate secrets available to that application, and review what the application could access.

Update the package with Composer. This changes your dependency files, so run it on a branch and test before deploying.

Update jane-php/open-api-3 to the latest allowed version (run in your project root)Shell
composer update jane-php/open-api-3
Caution. If your composer.json constrains the package to a version below 7.12.0, the update command will not move you to the fixed release. Raise the constraint first, then confirm with composer show that the installed version is 7.12.0 or higher.

After upgrading, run your generation step again and run composer show once more to confirm the version. The maintainers list the fix in the 7.12.0 release and in pull request 960. The research for this article does not describe the final patch contents, so review those links if you need the details. For context, the advisory's own suggested fix was to neutralize the comment-closing sequence in all generated PHPDoc text, including parameter names and descriptions, and to add a regression test.

Detection and monitoring afterwards

Because the dangerous code lands in generated files, you can make unexpected changes visible. Commit generated clients to version control and review diffs when they are regenerated. A new constructor or a method that does not map to an operation in the spec should stand out in a diff.

  • Add a CI check that fails when generated output changes unexpectedly after a spec update.
  • Use Composer's audit feature in CI to flag known-vulnerable dependencies.
  • Limit what the PHP process that uses generated SDKs can do: least-privilege credentials, restricted outbound network access, and no write access to code directories.
  • Watch application logs for unexpected outbound connections or new files appearing on servers that call external APIs through generated clients.
Tip. Composer can report known advisories for your installed packages. Running composer audit in CI means a flaw like this one shows up in the build rather than in a news post.

This issue lives in your build and dependency chain rather than on your public website, so an outside-in scan cannot see it. If you also run public sites, certificate and header-change monitoring and the security headers checker cover the web-facing side, while the dependency checks above cover this one.

Open questions

If you use other Jane packages or find further advisories for jane-php/open-api-3, check each advisory's fixed version to be sure your installed release covers it.

At the time of writing, the research for this story consists of the GitHub advisory and the CVE record. There is no report of this flaw being exploited in the wild, and the CISA Known Exploited Vulnerabilities field is empty. That is not proof that nobody has tried, so treat the upgrade as urgent for any pipeline that handles third-party specs.

Timeline

Key dates from the GitHub advisory
DateEvent
Jul 9, 2026Advisory published to the janephp/janephp repository
Nov 18, 2026Published by the National Vulnerability Database
Nov 19, 2026Published to and reviewed in the GitHub Advisory Database

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. CVE-2026-63411 - GitHub Advisory Databasegithub.com
  • PHP
  • Composer
  • OpenAPI
  • RCE
  • supply chain