MagicLink: Insecure Deserialization of MagicLink Actions Leads to Remote Code Execution
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | cesargb/laravel-magiclink | >= 2.0.0, < 2.25.1 | 2.25.1 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-502- Platform
- Composer
- Package
cesargb/laravel-magiclink- Disclosed
- 12.02.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-r33w-fg8j-9c94 - CC BY 4.0
Vulnerability history: cesargb/laravel-magiclink
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.