Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.2CVE-2026-135147

Laravel MongoDB: query expression injection in incrementEach() and decrementEach()

Published 25/11/2026 · Updated 25/11/2026 · MongoDB PHP Driver

Summary

A vulnerability (CWE-943) in the query builder of the MongoDB integration for Laravel allows values passed to the bulk counter-update helpers (incrementEach() and decrementEach()) to be interpreted by the database as query expressions rather than stored as plain text. Versions 4.8.0 up to, but not including, 5.12.2 are affected.

Per the CVSS vector (8.2, high), the attack is network-based, low complexity, and requires no authentication or user interaction. The precondition is that the application passes externally supplied data into these helpers.

An attacker may write unintended values into stored documents (limited integrity impact) and cause unintended disclosure of other data held in the same document (high confidentiality impact). The vulnerability is not listed in the CISA KEV catalog.

Who is affected

Organizations developing or running Laravel applications using the MongoDB integration (laravel-mongodb) versions 4.8.0 up to, but not including, 5.12.2.

What to do

  1. Upgrade the Laravel MongoDB integration to version 5.12.2 or later.
  2. Check the installed package version (e.g. in composer.lock) across all applications and environments.
  3. Review code for calls to incrementEach() and decrementEach() that receive user input or other external data.
  4. Until upgraded, strictly validate input values for these helpers (e.g. allow only expected numeric values).
  5. Follow the vendor's official advisory for details: https://jira.mongodb.org/browse/PHPLARA-310

Affected products and versions

MongoDB PHP Driver4.8.0 – < 5.12.2Fixed in: 5.12.2

CVSS vector, explained

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Attack vector
Network (from the internet)
Attack complexity
Low
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
Low impact
Availability
None

Weakness type (CWE)

  • CWE-943 Improper Neutralization of Special Elements in Data Query Logic

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.