Dec 4, 2026·11 min read·6 visits
Laravel Framework versions prior to 12.74.0 and 13.44.1 fail to restrict scientific notation exponents before passing user input to the `brick/math` library in `multiple_of` validation, dynamic field comparison rules (`gt`, `gte`, `lt`, `lte`), and Eloquent `decimal` attribute casts. Submitting values like `1e-100000000` causes PHP workers to allocate hundreds of megabytes of RAM and crash with fatal out-of-memory errors.
CVE-2026-142610 (GHSA-c25c-x5r7-2v5m) is an allocation of resources without limits or throttling vulnerability (CWE-770) in the Laravel Framework (`laravel/framework`). The flaw exists in how Laravel passes user-supplied numeric strings to the `brick/math` arbitrary-precision arithmetic library during specific validation rules (`multiple_of`, `gt`, `gte`, `lt`, `lte`) and Eloquent model decimal casting (`decimal:X`). When an unauthenticated remote attacker supplies a numeric string formatted in scientific notation with a large positive or negative exponent (e.g., `1e-100000000`), `Brick\Math\BigDecimal` and `Brick\Math\BigNumber` attempt to expand the full numeric representation in memory. This operation immediately exhausts the PHP process memory limit and causes high CPU utilization, terminating worker threads and resulting in an application-layer Denial of Service (DoS). The vulnerability is remediated in Laravel versions 12.74.0 and 13.44.1.
The Laravel Framework provides a comprehensive input validation engine (Illuminate\Validation\Validator) and an object-relational mapper (Illuminate\Database\Eloquent\Model) used to process and sanitize incoming HTTP request payloads. To avoid IEEE 754 floating-point precision inaccuracies when validating or casting decimal numbers, Laravel delegates numeric evaluations to the brick/math package (Brick\Math\BigDecimal and Brick\Math\BigNumber). These components sit directly on the external attack surface of web applications, processing untrusted parameters from query strings, form bodies, and JSON payloads prior to controller execution or database persistence.
CVE-2026-142610, classified under CWE-770 (Allocation of Resources Without Limits or Throttling), stems from missing bounds checks on scientific notation exponents in several code paths within Illuminate\Validation\Concerns\ValidatesAttributes and Illuminate\Database\Eloquent\Concerns\HasAttributes. Specifically, when an application uses the multiple_of validation rule, compares two input fields dynamically using gt, gte, lt, or lte, or casts an untrusted model attribute using the decimal:<precision> cast, the raw string input is passed directly to BigDecimal::of() or BigNumber::of() without verifying the size of its exponent.
When the brick/math parser encounters a scientific notation string with an extreme exponent such as 1e100000000 or 1e-100000000, it attempts to construct an exact string representation of the unscaled value or scale the decimal places in memory. Expanding a number with 100 million digits or decimal places forces the PHP engine to allocate hundreds of megabytes of contiguous heap memory and perform intensive string manipulation.
In standard PHP deployment models—including PHP-FPM behind Nginx/Apache and persistent worker runtimes like Laravel Octane (Swoole or RoadRunner)—each worker process is constrained by PHP's memory_limit directive (typically 128 MB or 256 MB). A single malicious HTTP request causes the executing worker to hit this memory ceiling and terminate with a fatal Allowed memory size exhausted error. Repeated requests saturate the worker pool, resulting in complete denial of service for legitimate users.
The underlying defect lies in the incomplete application of exponent validation guards across Laravel's numeric processing methods. In PHP, the native is_numeric() function returns true for strings formatted in scientific notation (e.g., '1e-100000000' or '1E+50000000'). Consequently, validation pipelines that include the numeric rule permit scientific notation strings to pass straight through to subsequent rules in the validation array.
To prevent resource exhaustion in arbitrary-precision calculations, Laravel previously implemented a helper method named ensureExponentWithinAllowedRange($attribute, $value) inside the ValidatesAttributes trait. This helper inspects numeric strings for an exponent marker (e or E) and throws a Brick\Math\Exception\MathException if the absolute value of the exponent exceeds 1000. However, this protective wrapper was omitted in three distinct operational contexts:
validateGt, validateGte, validateLt, validateLte): When comparing an input field against a static literal parameter (e.g., 'price' => ['numeric', 'gt:10']), Laravel invoked ensureExponentWithinAllowedRange. However, when the parameter referenced another input field in the request payload (e.g., 'max_price' => ['numeric', 'gt:min_price']), the code took an alternate branch that resolved $comparedToValue from the request data and passed both $this->trim($value) and $this->trim($comparedToValue) directly into BigNumber::of() without invoking ensureExponentWithinAllowedRange.validateMultipleOf): The validateMultipleOf method checked whether the input was numeric and then immediately instantiated $numerator = BigDecimal::of($this->trim($value)). It never called ensureExponentWithinAllowedRange on $value, nor did its catch block handle Illuminate\Support\Exceptions\MathException to fail validation cleanly.asDecimal): Within Illuminate\Database\Eloquent\Concerns\HasAttributes, the asDecimal($value, $decimals) method converts model attributes configured with 'field' => 'decimal:2' into scaled strings via BigDecimal::of((string) $value)->toScale($decimals, RoundingMode::HalfUp). Because Eloquent models do not inherit the ValidatesAttributes trait, asDecimal lacked any regular expression check on scientific notation exponents.When BigDecimal::of('1e-100000000')->remainder($denominator) or toScale() executes, brick/math calculates the zero-padding or aligns the scales of the two operands. Aligning a scale of 100,000,000 against a standard integer denominator (scale 0) requires running str_repeat('0', 100000000) and passing the resulting 100 MB string into GMP or BCMath arbitrary-precision division routines, triggering immediate memory exhaustion and CPU saturation.
The vulnerability was patched in commits bfb21ce13956c4ed4e38c3011d98bc96c509223d (Laravel 13.x) and d3dfc8cfa8e6966febddfb7c8914fa6d8f39d1f5 (Laravel 12.x). The modifications affect two primary files: src/Illuminate/Validation/Concerns/ValidatesAttributes.php and src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php.
In ValidatesAttributes.php, the field-to-field comparison branch inside validateGt, validateLt, validateGte, and validateLte previously passed trimmed user values straight to BigNumber::of(). The patch wraps both the primary attribute value and the target comparison field value in $this->ensureExponentWithinAllowedRange():
// File: src/Illuminate/Validation/Concerns/ValidatesAttributes.php
// Method: validateGt (identical pattern applied to validateLt, validateGte, validateLte)
if ($this->hasRule($attribute, $this->numericRules) && $this->isNumeric($value) && $this->isNumeric($comparedToValue)) {
try {
// BEFORE (Vulnerable):
// return BigNumber::of($this->trim($value))->isGreaterThan($this->trim($comparedToValue));
// AFTER (Patched): Both operands are verified to have an exponent within [-1000, 1000]
return BigNumber::of(
$this->ensureExponentWithinAllowedRange($attribute, $this->trim($value))
)->isGreaterThan(
$this->ensureExponentWithinAllowedRange($attribute, $this->trim($comparedToValue))
);
} catch (MathException|BrickMathException) {
return false;
}
}Similarly, in validateMultipleOf, the numerator is now sanitized through ensureExponentWithinAllowedRange() before BigDecimal::of() is called. Additionally, a catch (MathException) block was added so that out-of-range exponents cause the validation rule to return false (producing a standard HTTP 422 validation error response) rather than throwing an unhandled exception:
// File: src/Illuminate/Validation/Concerns/ValidatesAttributes.php
// Method: validateMultipleOf
try {
// BEFORE (Vulnerable):
// $numerator = BigDecimal::of($this->trim($value));
// AFTER (Patched): Enforce exponent limits on the input numerator
$numerator = BigDecimal::of($this->ensureExponentWithinAllowedRange($attribute, $this->trim($value)));
$denominator = BigDecimal::of($this->trim($parameters[0]));
if ($numerator->isZero() && $denominator->isZero()) {
return false;
}
if ($denominator->isZero()) {
return false;
}
return $numerator->remainder($denominator)->isZero();
} catch (MathException) {
// Gracefully fail validation when exponent exceeds +/- 1000
return false;
} catch (BrickMathException $e) {
throw new MathException('An error occurred while handling the multiple_of input values.', previous: $e);
}In HasAttributes.php, where Eloquent performs decimal attribute casting, the patch introduces an explicit regular expression check matching /e([+-]?\d+)$/i before invoking BigDecimal::of(). If the absolute integer value of the captured exponent exceeds 1000, an Illuminate\Support\Exceptions\MathException is thrown immediately:
// File: src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
// Method: asDecimal
protected function asDecimal($value, $decimals)
{
$value = (string) $value;
// AFTER (Patched): Reject scientific notation strings with exponents > 1000 or < -1000
if (preg_match('/e([+-]?\d+)$/i', $value, $matches) && abs((int) $matches[1]) > 1000) {
throw new MathException('Unable to cast value to a decimal.');
}
try {
return (string) BigDecimal::of($value)->toScale($decimals, RoundingMode::HalfUp);
} catch (BrickMathException $e) {
throw new MathException('Unable to cast value to a decimal.', previous: $e);
}
}> [!NOTE]
> Fix Completeness Assessment: In asDecimal, the regex /e([+-]?\d+)$/i does not trim leading or trailing whitespace from $value before checking the $ end-of-string anchor, whereas BigDecimal::of() also rejects untrimmed whitespace with a NumberFormatException. However, if an application passes a massive non-scientific string directly (e.g., a 50 MB raw numeric string without an e), that is bounded by HTTP web server body size limits (client_max_body_size / post_max_size), whereas scientific notation compresses a 100 MB memory allocation into an 11-byte payload (1e100000000). Thus, bounding the exponent at 1000 effectively closes the asymmetric amplification vector across all affected validation and casting paths.
Exploiting CVE-2026-142610 requires no authentication (unless the targeted endpoint sits behind authentication middleware) and no special configuration beyond the use of the affected validation rules or Eloquent casts. The attack relies on asymmetric resource amplification: an attacker transmits an 11-byte string (1e-100000000) over the network, forcing the server to allocate over 100 MB of RAM.
Scenario 1: Exploiting multiple_of Validation
Consider an e-commerce or financial API endpoint that validates order quantities or currency increments using the multiple_of rule without a preceding bail|max:X guard:
// Vulnerable Controller Action
public function storeOrder(Request $request)
{
$validated = $request->validate([
'amount' => ['required', 'numeric', 'multiple_of:0.01'],
]);
}An attacker sends the following HTTP POST request:
POST /api/orders HTTP/1.1
Host: vulnerable-laravel.example.com
Content-Type: application/json
Accept: application/json
{
"amount": "1e-100000000"
}When validateMultipleOf calls $numerator->remainder($denominator) on 1e-100000000 and 0.01, brick/math attempts to normalize both decimals to scale 100000000, immediately crashing the PHP worker process with an HTTP 500 error.
Scenario 2: Exploiting Field-to-Field Comparison (gt, gte, lt, lte)
Many search, filtering, and booking endpoints accept a range of values where one input field must be greater than or less than another field:
// Vulnerable Range Filter Validation
public function searchProducts(Request $request)
{
$request->validate([
'min_price' => ['required', 'numeric'],
'max_price' => ['required', 'numeric', 'gt:min_price'],
]);
}An attacker triggers memory exhaustion by sending a large positive or negative exponent in either min_price or max_price:
POST /api/products/search HTTP/1.1
Host: vulnerable-laravel.example.com
Content-Type: application/json
{
"min_price": "10",
"max_price": "1e100000000"
}Even if an application applies a max:1000 rule without the bail rule (e.g., ['numeric', 'max:1000', 'multiple_of:2']), Laravel evaluates all validation rules in sequence by default. While max:1000 will safely fail on 1e100000000 (because validateMax already checked ensureExponentWithinAllowedRange), if the attacker supplies a tiny fractional number with a large negative exponent such as 1e-100000000, 1e-100000000 is mathematically between 0 and 1000 (0 < 1e-100000000 < 1000). Unless min/max itself halts execution via bail, execution continues into validateMultipleOf or validateGt, triggering the crash.
CVE-2026-142610 is rated High severity with a CVSS v3.1 score of 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). The vulnerability does not allow data exfiltration (Confidentiality: None) or unauthorized state modification (Integrity: None), as execution terminates inside the validation or casting layer prior to business logic execution. However, the Availability impact is High (A:H).
In a standard PHP-FPM architecture, the master process manages a fixed pool of worker processes (pm.max_children, often configured between 5 and 50 per container or VM). When a request containing 1e-100000000 hits an affected endpoint, the assigned worker allocates memory up to PHP's memory_limit before being killed by the Zend Engine memory manager, or it triggers the Linux kernel Out-Of-Memory (OOM) killer if memory_limit is set high or -1. By transmitting a low-bandwidth stream of concurrent requests (e.g., 10 to 50 requests per second), an unauthenticated attacker can keep all PHP-FPM workers continuously crashing and respawning, causing the web server (Nginx/Apache) to return 502 Bad Gateway or 504 Gateway Timeout across the entire application.
The operational impact is even more pronounced in persistent application servers such as Laravel Octane (powered by Swoole, FrankenPHP, or RoadRunner) or queue workers processing untrusted payloads. When an Octane worker process crashes due to a fatal PHP memory exhaustion error, any in-flight tasks or connection state within that worker are abruptly terminated, and repeated worker restarts degrade throughput across all routes hosted by the service.
According to FIRST EPSS telemetry, CVE-2026-142610 carries an initial EPSS score of 0.00677 (0.68%, 53.67th percentile), and it is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Because public endpoints accepting numeric range filters (such as min_price / max_price or pagination/quantity multipliers) are ubiquitous in Laravel web applications and REST APIs, any unpatched internet-facing deployment utilizing these specific validation rules or decimal casts is directly exposed.
The primary remediation is to upgrade laravel/framework to a patched release that enforces the [-1000, 1000] exponent limit across all validation rules and Eloquent decimal casts:
13.44.1 or later.12.74.0 or later.Developers can apply the update via Composer:
composer update laravel/framework --with-dependenciesFor environments where an immediate framework upgrade cannot be deployed, engineering teams can implement defense-in-depth workarounds at the application and edge layers:
bail with Bounded Rules: Because validateMin, validateMax, and validateBetween already invoke ensureExponentWithinAllowedRange (which throws and fails validation on exponents outside [-1000, 1000]), prepending bail along with between or min/max before multiple_of or field-to-field gt/lt rules prevents execution from reaching the vulnerable code path:// Mitigated validation array using 'bail' and 'between'
$request->validate([
'min_price' => ['bail', 'required', 'numeric', 'between:0,1000000'],
'max_price' => ['bail', 'required', 'numeric', 'between:0,1000000', 'gt:min_price'],
'quantity' => ['bail', 'required', 'numeric', 'between:1,10000', 'multiple_of:2'],
]);> [!WARNING]
> Both bail AND a bounding rule (min, max, or between) must precede multiple_of or gt:<field>. Without bail, Laravel continues evaluating subsequent rules even after between fails on an excessive exponent, which will still trigger the crash in multiple_of or gt:<field>.
/[+-]?\d*(?:\.\d+)?e[+-]?(?:[1-9]\d{3,})/i.CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
laravel/framework Laravel | < 12.74.0 | 12.74.0 |
laravel/framework Laravel | >= 13.0.0, < 13.44.1 | 13.44.1 |
| Attribute | Detail |
|---|---|
| CVE / Advisory ID | CVE-2026-142610 / GHSA-c25c-x5r7-2v5m |
| Weakness Class | CWE-770: Allocation of Resources Without Limits or Throttling |
| CVSS v3.1 Score | 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) |
| Attack Vector | Remote / Unauthenticated HTTP Request |
| Impact | Application Denial of Service (PHP Memory Limit & CPU Exhaustion) |
| Affected Components | ValidatesAttributes (multiple_of, gt, gte, lt, lte) & HasAttributes (asDecimal) |
| Patched Versions | laravel/framework 12.74.0 and 13.44.1 |
| EPSS / KEV Status | 0.68% (53.67th Percentile) / Not in CISA KEV |
The software allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
A projection sanitization and schema path exclusion bypass vulnerability exists in Mongoose versions 8.5.0 through 8.24.9 and 9.0.0 through 9.12.1. Due to insufficient validation of MongoDB projection syntax in `sanitizeProjection` and `applyPaths`, attackers supplying untrusted projection inputs to queries can force the retrieval of sensitive schema fields configured with `select: false`, such as password hashes, reset tokens, and multi-factor authentication secrets.
CVE-2026-142595 is a NoSQL query operator injection vulnerability in Automattic Mongoose caused by an incomplete denylist in the sanitizeFilter query sanitization utility. Prior to the patched versions, sanitizeFilter blocked only four specific top-level operators ($jsonSchema, $where, $expr, and $text), allowing unrecognized or internal MongoDB operators such as $_internalSchemaXor and $_internalSchemaCond to pass through unsanitized. Attackers capable of supplying top-level filter keys can inject arbitrary nested query selectors to bypass authentication, extract sensitive data via boolean inference, or modify database records.
CVE-2026-137198 is a high-severity argument injection vulnerability (CWE-88) affecting the Node.js cross-spawn library in versions 6.0.6 and 7.0.4 through 7.0.6. On Windows systems, when commands are routed through cmd.exe (including batch files and npm cmd-shims in node_modules/.bin), cross-spawn fails to properly double contiguous sequences of two or more backslashes preceding a double quote or at the end of an argument. This parsing failure causes the argument's closing quotation mark to be escaped as a literal character, allowing attacker-controlled input to break out of quotation encapsulation and inject arbitrary command-line arguments or consume subsequent arguments.
DOMPurify prior to version 3.5.0 contains a sanitization bypass in the SAFE_FOR_TEMPLATES configuration mode. By embedding split template expression delimiters across invalid nested <form> elements, an attacker can evade character data scrubbing during initial sanitization. When the sanitized markup is subsequently re-parsed into the DOM via innerHTML, browser HTML5 parsing rules strip the nested <form> tags and concatenate the split text nodes, reconstructing executable template expressions that trigger Cross-Site Scripting (XSS) in client-side template engines.
CVE-2026-74870 is an information exposure vulnerability in the Python package openssl_encrypt affecting versions 1.4.7 and earlier. The diagnostic CLI subcommands 'hsm fido2-test' and 'hsm onlykey-test' unconditionally write full derived hardware cryptographic peppers as hexadecimal strings to standard error. Additionally, the FIDO2 hardware pepper plugin logs unredacted pseudo-random function (PRF) output to debug logs and user-facing error messages. While the diagnostic pepper is bound to a random per-invocation test salt and cannot directly decrypt stored files, the behavior exposes raw hardware-derived key material to terminal scrollbacks, session recordings, and CI/CD logs.
A validation logic bypass vulnerability exists in the Laravel Framework validation subsystem prior to versions 12.72.0 and 13.43.0. When validating nested attributes or wildcard arrays using the 'sometimes' rule, the framework uses the literal string '__missing__' as an in-band sentinel value to detect absent keys. An attacker who submits the literal string '__missing__' as the value for a nested attribute causes the validator to misinterpret the field as omitted, bypassing all subsequent validation rules while still returning the unvalidated string in the validated dataset.