Tech Brief 2026-12-03

Laravel fixes Sanctum bug that could authenticate requests as the wrong user

The guard bug inside eager-loaded relations could return the database's lowest user ID; fixed in 12.73.0.

Laravel has shipped version 12.73.0 fixing a bug in the Sanctum authentication guard tracked as CVE-2026-142636 with a CVSS score of 6.8. When the guard is evaluated inside an eager-loaded relation definition, Sanctum could resolve and return the user with the lowest ID in the database, which in many applications is the primary administrator account. Any request hitting such a code path could effectively authenticate as that user.

The vendor published the fix on 2 December. Applications should upgrade to Laravel framework 12.73.0 or later and audit their code for authentication guards invoked within relation definitions, a pattern that can be easy to introduce unintentionally. The bug is a reminder that authentication logic does not belong inside ORM relationship definitions, and that framework updates in this area deserve fast adoption.

Teams running Sanctum-protected Laravel APIs in production should prioritise this patch in this week's maintenance cycle.