ZeroHour

CVE-2026-61701

niche

Unsafe Deserialization Leading to RCE in Laravel MagicLink Package

CVSS 3.1
8.8 high
EPSS
Published
()
Modified
AI analysis

Laravel MagicLink, a package for passwordless authentication and private-content links, stores serialized action objects in the magic_links.action database column and deserializes them via src/MagicLink.php and src/Actions/ResponseAction.php without sufficient integrity protection, including an unsafe legacy unserialize() fallback. The flaw (CWE-502) is triggered when an attacker who can already manipulate database records—for example through a separate SQL injection or compromised administrative access—inserts a malicious serialized object graph containing executable closure behavior; simply visiting the associated magic link then deserializes the tampered record and can execute arbitrary code in the application process. The vulnerability does not itself grant database-write access, so it primarily serves as a privilege-escalation/RCE step chained after initial database compromise. Applications running MagicLink from 2.0.0 up to (but not including) 2.25.1 are affected, and the issue is fixed in 2.25.1. No public proof of concept exists and no exploitation has been observed in the wild.

What to do: Upgrade Laravel MagicLink to version 2.25.1 or later, which adds integrity protection for stored action records. Audit the magic_links.action column for unexpected or malformed serialized payloads that could indicate a tampering attempt, and review database and admin access logs for unauthorized writes. Since exploitation chains off SQL injection or compromised credentials, verify the application is free of injectable queries, restrict database accounts to least privilege, and rotate any credentials with write access to the magic_links table.

Affected
MagicLink (Laravel package) Laravel MagicLink>=2.0.0, <2.25.1 (fixed in 2.25.1)
Estimated exposure
nichelikely low thousands of Laravel applications at most; exact count unknown — MagicLink is a niche Composer package for Laravel with no public active-install counts (unlike WordPress plugins), and deserialization-based exploitation requires pre-existing database-write access, so the realistically at-risk population…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Laravel MagicLink creates links for authentication without a password or for accessing private content. From 2.0.0 until 2.25.1, MagicLink stores serialized action objects in the magic_links.action database column and deserializes them through src/MagicLink.php and src/Actions/ResponseAction.php without sufficient integrity protection, while an unsafe legacy unserialize() fallback remains reachable. An attacker who can manipulate database records, such as through a separate SQL injection or compromised administrative access, can insert a malicious serialized object graph containing executable closure behavior; visiting the associated magic link then deserializes the record and can execute arbitrary code in the application process. The affected path is restricted to manipulated action records and does not independently provide database-write access. This issue is fixed in version 2.25.1.

Weakness
CWE-502
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.