1. Summary of CVE-2021-43503

Vulnerability Name Laravel Remote Code Execution Vulnerability (CVE-2021-43503)
Release Time May 2022
Component Name Laravel
Affected Versions Laravel ≤ 5.8.38
Vulnerability Type Remote Code Execution
Exploit Condition User Authentication: Not required. Precondition: Default. Trigger Mode: Remote
Description Exploit Difficulty: Unknown

Severity: Critical. Attackers can achieve remote code execution. CVSS Score: 9.8

2. About the Vulnerability

2.1 Introduction

Laravel is a free and open-source PHP web framework used for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony.

2.2 Summary

On May 12, 2022, Sangfor FarSight Labs received a notice about a remote code execution vulnerability (CVE-2021-43503) in Laravel, classified as critical with a CVSS score of 9.8.

A Remote Code Execution (RCE) vulnerability exists in h Laravel 5.8.38 via an unserialize() POP chain in the following php files:

  1. __destruct in \Routing\PendingResourceRegistration.php
  2. __call in Queue\Capsule\Manager.php
  3. __invoke in mockery\library\Mockery\ClosureWrapper.php

An attacker can use this vulnerability to construct malicious data for remote code execution attacks without authorization, thereby obtaining root or admin permissions.

3. Affected Versions

Laravel ≤ 5.8.38

4. Solutions

4.1 Remediation Solutions

4.1.1 Check the Component Version

Method 1: Simply run the following artisan command (php artisan --version) from your CLI and it will return your Laravel version.

Laravel Remote Code Execution Vulnerability CVE-2021-43503 method 1

Method 2: Check vendor/laravel/framework/src/Illuminate/Foundation/Application.php for the version constant.

Laravel Remote Code Execution Vulnerability CVE-2021-43503 method 2

Method 3: View the composer.json file to obtain the component version.

Laravel Remote Code Execution Vulnerability CVE-2021-43503 method 3

4.1.2 Laravel Solution

Users can update their affected products to the latest version to fix the vulnerability at https://github.com/laravel/laravel

4.1.3 Workaround

Disable debug mode.

4.2. Sangfor Solutions

4.2.1 Security Monitoring

The following Sangfor products and services perform real-time monitoring of assets affected by the Laravel remote code execution vulnerability (CVE-2021-43503):

4.2.2 Security Protection

The following Sangfor products and services provide protection against the Laravel remote code execution vulnerability (CVE-2021-43503):

5. Timeline

On May 12, 2022, Sangfor FarSight Labs received a notice about the Laravel remote code execution vulnerability (CVE-2021-43503).

On May 12, 2022, Sangfor FarSight Labs released a vulnerability alert with remediation solutions.

6. Reference

https://github.com/guoyanan1g/Laravel-vul/issues/2#issue-1045655892

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-43503 

7. Learn More

Sangfor FarSight Labs researches the latest cyberthreats and unknown zero-day vulnerabilities, alerting customers to potential dangers to their organizations, and providing real-time solutions with actionable intelligence. Sangfor FarSight Labs works with other security vendors and the security community at large to identify and verify global cyberthreats, providing fast and easy protection for customers.

Listen To This Post

Search

Related Articles

Tycoon2FA Phishing: How Attackers Steal Sessions Even with MFA Deployed

Date : 27 Aug 2026
Read Now

How ChainDrop Weaponized Developer Faith to Compromise Hundreds of npm Packages in Hours

Date : 14 Aug 2026
Read Now

FortiBleed: Not Every New Entry Starts with a New Vulnerability

Date : 14 Jul 2026
Read Now

See Other Product

Athena SASE - Secure Access Service Edge
Sangfor Athena NGFW - Next Generation Firewall
Sangfor Athena EPP - Modern Endpoint Protection Platform
Sangfor Athena NDR - Network Detection and Response
Cyber Command - NDR Platform
MDR TCO Calculator - User Input Page