Advisory

GHSA-r33w-fg8j-9c94

Also known as: CVE-2026-61701

Summary

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

Details

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](src/MagicLink.php#L59-L77) and [src/Actions/ResponseAction.php](src/Actions/ResponseAction.php#L64-L77). 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](src/Security/Serializable/Serializable.php) security class with signing/verification, refactored getter/setter methods in MagicLink.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-02-12 22:11 UTC
Modified
2026-09-15 03:56 UTC

Affected packages and fixes

cesargb/laravel-magiclink

Packagist · All systems

Affected

  • introduced 2.0.0, fixed 2.25.1 (ecosystem)

Fixed versions

2.25.1

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences