CVE-2026-142649: Laravel `in` / `Rule::in` Validation Rule Vulnerability

MODERATE
Advisory Identifier: GHSA-h2hg-mfj4-rg7q
CVSS 5.3
CWE-697
Published
Advisory Summary

CVE-2026-142649 is a MODERATE (CVSS 5.3) `in` / `rule::in` validation rule vulnerability (CWE-697: Incorrect Comparison) affecting Laravel libraries in the Packagist ecosystem. The issue involves `in` / `rule::in` validation rule bypass via loose comparison. Remediation is available by upgrading affected packages to version 12.67.0, 13.26.0.

CVE-2026-142649 at a Glance

CVE Identifier CVE-2026-142649
GHSA Identifier GHSA-h2hg-mfj4-rg7q
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-697: Incorrect Comparison
Affected Product Laravel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-142649

To remediate this vulnerability, upgrade all affected Laravel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

laravel/framework fixed: 12.67.0
Upgrade laravel/framework to 12.67.0
laravel/framework fixed: 13.26.0
Upgrade laravel/framework to 13.26.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for laravel/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-142649, inspect your project dependencies for Laravel:

inspect dependencies for laravel/framework

Analyze the terminal output to locate any version of Laravel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.67.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-697: Incorrect Comparison, where the product compares two entities in a security-relevant context, but the comparison is incorrect. In Laravel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `in` validation rule (and `Rule::in`, and `not_in` via the same code) compares the scalar input to the allowlist with a **non-strict** `in_array()`. PHP 8 then compares numeric strings numerically, so many values that are **not literally in the list** pass validation — including whitespace-padded, leading-zero, signed, and scientific-notation forms, and an embedded newline. The value returned by `validated()` / `valid()` is the **raw, un-canonicalized** input, so the attacker-controlled bytes flow through to the application even though the rule was supposed to constrain them to a fixed set. The array branch of the same method already compares as strings (`array_diff`), so this is an internal inconsistency, not intended behavior. ## Impact Any allowlist of numeric values — feature flags (`in:0,1`), status codes, role/tenant/enum IDs stored as integers may be bypassed with an equivalent-but-not-identical representation. ## Patched Fixed in [#61146](https://github.com/laravel/framework/pull/61146) ## Reported by — Sergey Sannikov, GitHub @semx

CVE-2026-142649 Affected Laravel Versions

2 component(s)
Fixed Versions:
12.67.013.26.0
Product / Package Ecosystem Affected Versions Fixed Version
laravel/framework
Packagist
< 12.67.0
12.67.0
laravel/framework
Packagist
≥ 13.0.0
< 13.26.0
13.26.0

References

Frequently Asked Questions

What is CVE-2026-142649?
CVE-2026-142649 is a security vulnerability in Laravel involving `in` / `Rule::in` validation rule bypass via loose comparison under CWE-697: Incorrect Comparison.
Which Laravel versions are affected?
Affected versions include releases prior to 12.67.0, 13.26.0 across affected packages: laravel/framework.
What version fixes CVE-2026-142649?
Upgrading to 12.67.0, 13.26.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/framework affected?
Yes, laravel/framework is affected in releases prior to 12.67.0, 13.26.0. Upgrade your dependency to 12.67.0, 13.26.0 or later.
What is the CVSS score of CVE-2026-142649?
CVE-2026-142649 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-142649?
CVE-2026-142649 is classified under CWE-697: Incorrect Comparison (The product compares two entities in a security-relevant context, but the comparison is incorrect.).
How can I check Packagist dependencies for CVE-2026-142649?
Run the dependency tree command: 'inspect dependencies for laravel/framework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h2hg-mfj4-rg7q",
  "modified" : "2026-12-03T18:54:45Z",
  "published" : "2026-12-03T18:54:45Z",
  "aliases" : [ "CVE-2026-142649" ],
  "summary" : "Laravel: `in` / `Rule::in` validation rule bypass via loose comparison",
  "details" : "## Summary\n\nThe `in` validation rule (and `Rule::in`, and `not_in` via the same code) compares\nthe scalar input to the allowlist with a **non-strict** `in_array()`. PHP 8 then\ncompares numeric strings numerically, so many values that are **not literally in\nthe list** pass validation — including whitespace-padded, leading-zero,\nsigned, and scientific-notation forms, and an embedded newline. The value\nreturned by `validated()` / `valid()` is the **raw, un-canonicalized** input, so\nthe attacker-controlled bytes flow through to the application even though the\nrule was supposed to constrain them to a fixed set.\n\nThe array branch of the same method already compares as strings\n(`array_diff`), so this is an internal inconsistency, not intended behavior.\n\n## Impact\n\nAny allowlist of numeric values — feature flags (`in:0,1`), status codes,\nrole/tenant/enum IDs stored as integers may be bypassed with an\nequivalent-but-not-identical representation. \n\n## Patched\nFixed in [#61146](https://github.com/laravel/framework/pull/61146) \n\n## Reported by\n— Sergey Sannikov, GitHub @semx",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.67.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0.0"
      }, {
        "fixed" : "13.26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/security/advisories/GHSA-h2hg-mfj4-rg7q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-142649"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/pull/61146"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/commit/0db83d4177675d9290bee91f33f90b2b5828e56e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/releases/tag/v12.67.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/releases/tag/v13.26.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-697" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-03T18:54:45Z",
    "nvd_published_at" : "2026-12-03T00:18:07Z"
  }
}