Skip to content

MagicLink: Insecure Deserialization of MagicLink Actions Leads to Remote Code Execution

High severity GitHub Reviewed Published Feb 12, 2026 in cesargb/laravel-magiclink • Updated Feb 12, 2026

Package

composer cesargb/laravel-magiclink (Composer)

Affected versions

>= 2.0.0, < 2.25.1

Patched versions

2.25.1

Description

Description

MagicLink stores serialized action objects in the magic_links.action database column and deserializes them without integrity validation or class allowlisting in src/MagicLink.php and src/Actions/ResponseAction.php. An attacker with the ability to manipulate database records (e.g., via SQL injection or compromised admin access) could inject malicious serialized objects containing arbitrary closures, leading to Remote Code Execution (RCE) when the magic link is visited.

Resolution

The vulnerability has been mitigated through HMAC-signed serialization using the application key, class allowlisting restricted to ActionAbstract subclasses and framework classes, strict type validation preventing arbitrary object storage, and backward compatibility support for legacy data via allowed_classes in unserialize(). Implementation includes a new Serializable security class with signing/verification, refactored getter/setter methods in MagicLink.

References

@cesargb cesargb published to cesargb/laravel-magiclink Feb 12, 2026
Published to the GitHub Advisory Database Feb 12, 2026
Reviewed Feb 12, 2026
Last updated Feb 12, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Weaknesses

Deserialization of Untrusted Data

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-r33w-fg8j-9c94

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.