Guard Bypass in Eloquent Models Affecting Laravel Illuminate Database Component

illuminate/database Updated 02 Oct 2025

Summary

24/05/2022
Yes i
High
7.5

CVE-2020-24940: Guard bypass in Eloquent models affecting Laravel illuminate database component. Affects illuminate/database across 3 version ranges.

>= 5.5.0, <= 5.5.44 >= 6.0.0, < 6.18.34 >= 7.0.0, < 7.23.2

Fixed in 6.18.34 or 7.23.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-24940 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Laravel Illuminate Database component is a popular package used in Laravel applications for database management. It provides an expressive query builder, ActiveRecord implementation, and various other utilities for interacting with databases. The component is widely used in Laravel projects for efficient and secure database operations.

Vulnerability Detail

The vulnerability, identified as GHSA-c7rm-w2hj-x8g3, affects versions of Laravel before 6.18.34 and 7.x before 7.23.2. It involves the Eloquent models in the Illuminate Database component. In certain scenarios, unvalidated values are saved to the database component during mass assignment, bypassing the intended guard mechanisms. This can lead to unauthorized modifications to the database, potentially compromising the integrity and security of the application. The vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0, < 6.18.34 6.18.34
    composer require illuminate/database:6.18.34
  • >= 7.0.0, < 7.23.2 7.23.2
    composer require illuminate/database:7.23.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to apply the recommended fix by upgrading to the patched versions of Laravel.

Conclusion

The Guard Bypass vulnerability in Eloquent models affecting the Laravel Illuminate Database component can lead to unauthorized modifications to the database, posing a significant risk to the application's integrity and security. It is highly recommended to upgrade to the fixed versions of Laravel to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for illuminate/database →

Share this vulnerability

FAQ

The vulnerability allows unvalidated values to be saved to the database component, bypassing guard mechanisms. This can lead to unauthorized modifications to the database, potentially compromising the integrity and security of the application.

Versions of Laravel before 6.18.34 and 7.x before 7.23.2 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your composer.lock file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, the fix for this vulnerability is to upgrade to Laravel version 6.18.34 or 7.23.2, depending on the Laravel version being used.

There are no known workarounds for this vulnerability. It is crucial to apply the recommended fix by upgrading to the patched versions of Laravel.

Related vulnerabilities

Recent vulnerabilities recorded for illuminate/database.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0, < 6.18.34 6.18.34
    composer require illuminate/database:6.18.34
  • >= 7.0.0, < 7.23.2 7.23.2
    composer require illuminate/database:7.23.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback