/

CVE-2026-44262

Severity:

CRITICAL RISK

(9.4)

Code Injection in Scramble Laravel API Documentation

CVE-2026-44262

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Scramble, a Laravel API documentation generator, contains a code injection issue where validation rules that reference user-controlled input can be evaluated during documentation generation.

When documentation endpoints are publicly accessible, this may allow execution of arbitrary PHP code in the application context using request-supplied data.

Affected context

This vulnerability affects Laravel applications that integrate Scramble for automatic API documentation generation and expose documentation endpoints publicly.

The risk arises when validation rules or related expressions are dynamically constructed using request data, and these rules are evaluated as part of Scramble's documentation generation process.

Environments where documentation is available without authentication, or where internal tooling is exposed to untrusted users, are particularly susceptible.

Exploit preconditions

  • Attack surface: HTTP(S) endpoints serving Scramble-generated API documentation
  • Required access: Ability to send crafted requests to the documentation endpoint (e.g., public or low-friction access)
  • Trigger point: Documentation generation or preview that evaluates validation rules involving user-supplied input
  • Why exploitation is possible: Scramble executes or evaluates PHP expressions derived from Laravel validation rules that can be influenced by request data, allowing untrusted input to reach dynamic code evaluation paths

Why this happens

The core issue stems from treating validation rules and related metadata as executable logic that may be re-evaluated in the context of documentation generation.

When validation constructs are built using user-controlled input and then interpreted or executed by Scramble, untrusted data effectively controls parts of a code path.

This aligns with CWE-94: Improper Control of Generation of Code ('Code Injection'), where dynamically generated or evaluated code is derived from inputs that are not properly constrained, validated, or isolated from execution mechanisms.

Potential impact

  • Remote execution of arbitrary PHP code within the Laravel application context
  • Complete compromise of the affected application's confidentiality, integrity, and availability
  • Unauthorized access to application data, secrets, and connected resources (e.g., databases, message queues)
  • Installation of web shells or persistence mechanisms within the application environment
  • Use of the compromised application as a pivot point for broader infrastructure attacks

General mitigation guidance

Mitigation generally focuses on separating untrusted input from any dynamic code evaluation and constraining how validation rules are defined and consumed:

  • Prefer declarative, static validation rule definitions that do not depend on request-supplied data or runtime-generated PHP expressions.
  • Avoid patterns where validation logic or metadata is constructed via string concatenation, dynamic evaluation functions, or closures derived from user input.
  • Restrict access to documentation endpoints, treating them as administrative or internal tooling rather than public interfaces.
  • Apply least-privilege principles in the application environment so that, even if documentation-related code paths are abused, the blast radius is reduced.
  • Introduce central guidelines for validation and documentation generation that forbid unsafe dynamic code patterns and promote safe abstractions.

How teams detect issues like this

Detection efforts can combine code-centric and runtime-centric approaches:

  • Use static analysis rules or linters to flag dynamic evaluation constructs (such as eval-like mechanisms, dynamic includes, or execution of strings) within validation and documentation-related code.
  • During code review, pay special attention to validation rules and Scramble integration points that derive behavior from request data or environment variables.
  • Implement logging and monitoring of documentation endpoints to identify unusual or malformed requests that might indicate probing for code execution.
  • Employ application security testing tools (e.g., SAST/DAST) to simulate untrusted input to documentation endpoints and identify code execution sinks.

Sources

SourceLink
github.comgithub.com/dedoc/scramble/releases/tag/v0.13.22
github.comgithub.com/dedoc/scramble/security/advisories/GHSA-4rm2-28vj-fj39

Frequently asked

questions

Yes. If the documentation endpoints are reachable over the network and the vulnerable conditions are present, an attacker can remotely trigger code execution by sending crafted requests.

An attacker typically needs only network access to the documentation endpoint. If that endpoint is public or minimally protected, no prior authentication may be required, depending on how the application is configured.

The safest pattern is to ensure validation rules and any code paths used during documentation generation are defined statically and never constructed from user-controlled input. Removing or refactoring any dynamic evaluation mechanisms from the Scramble integration is key.

Establish coding standards that prohibit dynamic code generation or evaluation from user input, enforce these standards with automated checks, and treat internal tooling endpoints (like documentation generators) as high-value surfaces that must be access-controlled and regularly reviewed for unsafe patterns.

Find out what's already
exploitable in your codebase.