Summary
The query builder component of the MongoDB integration library for a PHP web framework (Laravel) does not run the query-modification callbacks (beforeQuery) that an application registers with the framework. These callbacks are skipped before read, update and delete operations are sent to the database. As a result, a filter the application relies on to limit which records a request may touch can be silently omitted (CWE-862: Missing Authorization).
Per the CVSS vector (8.1, high severity), the attack is network-based and low in complexity. It requires an authenticated user with basic privileges and no user interaction. An attacker may read or modify records that were meant to be out of reach, with high impact on confidentiality and integrity. Availability is not affected.
The vulnerability is not listed in the CISA KEV catalog, and no EPSS data is available.
Who is affected
Organizations building or running Laravel applications with the MongoDB integration in versions 4.8.0 up to (but not including) 5.12.2. This matters most where beforeQuery callbacks are used to restrict data access, e.g. per-user or per-tenant scoping.
What to do
- Upgrade the Laravel MongoDB library to version 5.12.2 or later.
- Check composer.lock to identify the package version your applications use and whether it falls between 4.8.0 and before 5.12.2.
- Identify where the application uses beforeQuery callbacks to restrict record access. Until you upgrade, enforce explicit authorization conditions directly in queries or at the application layer.
- Review data access and modification logs for signs of unauthorized reads or changes.
- For further details, follow the vendor's official advisory: https://jira.mongodb.org/browse/PHPLARA-321
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- None
Weakness type (CWE)
- CWE-862 Missing Authorization
References
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.