NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

Laravel: `in` / `Rule::in` validation rule bypass via loose comparisonGHSA-h2hg-mfj4-rg7q

MEDIUMFix: laravel/framework#61146

GHSA-h2hg-mfj4-rg7q is a medium-severity (CVSS 5.3) vulnerability in laravel/framework. A fix is available for laravel/framework — see the affected versions and patch details below.

Also known asCVE-2026-142649
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Dec 3, 2026 · OSV.dev, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-h2hg-mfj4-rg7q.

Real-World Exposure

2 pkgs affected
🐘laravel/framework🐘laravel/framework

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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

Reported by

— Sergey Sannikov, GitHub @semx

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistlaravel/frameworkall versions12.67.0composer require laravel/framework:^12.67.0
🐘Packagistlaravel/framework≥ 13.0.0&&< 13.26.013.26.0composer require laravel/framework:^13.26.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for laravel/framework, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update laravel/framework to 12.67.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-h2hg-mfj4-rg7q is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

## 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
O3 Security · Impact-Aware SCA

Is GHSA-h2hg-mfj4-rg7q in your dependencies?

Find it across Packagist, including transitive dependencies.