A critical code injection flaw has been disclosed in jane-php/open-api-3, a popular PHP library that turns OpenAPI documents into ready-to-use API client code. The issue, tracked as CVE-2026-63412, was published in a GitHub security advisory on 19 November 2026. It carries a CVSS score of 9.3.

If a developer generates a client from an OpenAPI document that an attacker has tampered with, the generated PHP code can contain hidden instructions. Those instructions run every time the application creates the client. A fix is available in version 7.12.0. At the time of writing the flaw is not listed in CISA's Known Exploited Vulnerabilities catalogue, and there are no public reports of attacks.

At a glance: CVE-2026-63412 (jane-php/open-api-3). Critical · CVSS 9.3. Exploited: No known attacks yet (not in CISA KEV). Affected: jane-php/open-api-3 before 7.12.0 (confirmed on 7.11.2 with PHP 8.1). What to do: Update to jane-php/open-api-3 7.12.0 or later, then regenerate clients.

What is affected

The flaw sits in the Jane code generator for OpenAPI 3 documents. It matters to any PHP project that uses Jane to build an SDK or API client from a specification file.

  • Package: jane-php/open-api-3 (installed through Composer)
  • Confirmed vulnerable: version 7.11.2, tested on PHP 8.1
  • Fixed in: version 7.12.0 or later
  • Also at risk: any client code already generated by an affected version from an untrusted or unchecked OpenAPI document

The advisory does not list the exact first affected version. Treat any release before 7.12.0 as potentially vulnerable.

What goes wrong

Jane builds PHP code in a structured way, which normally keeps text from a specification safely inside quoted strings. However, the comments it writes above each generated method (known as PHPDoc blocks) are copied in as raw text.

These comments include the names of query parameters taken straight from the OpenAPI document. A parameter name can be crafted to close the comment early. Whatever follows it is then treated by PHP as real code inside the generated client class. In the researcher's test, this was used to add a constructor to the client, so the injected code runs as soon as the client object is created. Applications typically create the client on every API call.

The advisory classes this as code injection (CWE-94), with related weaknesses in output escaping (CWE-95 and CWE-116).

Why it matters

Many teams generate clients from specifications they did not write. These might come from a partner, a SaaS vendor, a public API directory or an automated build step that downloads the latest spec. If any of those sources is compromised or malicious, the attacker's code ends up inside your own application.

This is a supply chain risk. The malicious code would sit in files your developers may never read closely, because generated code is usually trusted and skipped in review. Once deployed, it runs with the same permissions as your PHP application. That can mean access to databases, customer data, API keys and payment integrations.

What to do now

  • Update jane-php/open-api-3 to 7.12.0 or later, for example with composer update jane-php/open-api-3, and check your composer.lock reflects the new version.
  • Regenerate every client built with an older version. Updating the library does not clean code that was already generated.
  • Review generated client classes for anything unexpected, such as constructors or methods you did not expect, or comment blocks that look broken.
  • Check where your specs come from. List every OpenAPI document you generate clients from and confirm each source is trusted.
  • Look at automated pipelines. If your CI or build process fetches remote specs and regenerates clients automatically, pause it until the library is updated.
  • Commit generated code to version control and review changes to it, so unexpected additions show up in diffs.

If you only generate clients from specifications your own team writes and controls, the immediate risk is lower. You should still update, as specs often pass through several hands and tools before they reach the generator.

Not sure if this affects you? Talk to us and we will check your sites and servers and plan the update with you.

Sources