GHSA-r33w-fg8j-9c94: MagicLink Remote Code Execution Vulnerability

HIGH
CVSS 8.8
CWE-502
Published
Advisory Summary

GHSA-r33w-fg8j-9c94 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting MagicLink libraries in the Packagist ecosystem. The issue involves insecure deserialization of magiclink actions leads to remote code execution. Remediation is available by upgrading affected packages to version 2.25.1.

GHSA-r33w-fg8j-9c94 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r33w-fg8j-9c94
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product MagicLink
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-r33w-fg8j-9c94

To remediate this vulnerability, upgrade all affected MagicLink dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

cesargb/laravel-magiclink fixed: 2.25.1
Upgrade cesargb/laravel-magiclink to 2.25.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for cesargb/laravel-magiclink

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r33w-fg8j-9c94, inspect your project dependencies for MagicLink:

inspect dependencies for cesargb/laravel-magiclink

Analyze the terminal output to locate any version of MagicLink in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.25.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In MagicLink, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

GHSA-r33w-fg8j-9c94 Affected MagicLink Versions

1 component(s)
Fixed Versions:
2.25.1
Product / Package Ecosystem Affected Versions Fixed Version
cesargb/laravel-magiclink
Packagist
≥ 2.0.0
< 2.25.1
2.25.1

References

Frequently Asked Questions

What is GHSA-r33w-fg8j-9c94?
GHSA-r33w-fg8j-9c94 is a security vulnerability in MagicLink involving Insecure Deserialization of MagicLink Actions Leads to Remote Code Execution under CWE-502: Deserialization of Untrusted Data.
Which MagicLink versions are affected?
Affected versions include releases prior to 2.25.1 across affected packages: cesargb/laravel-magiclink.
What version fixes GHSA-r33w-fg8j-9c94?
Upgrading to 2.25.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cesargb/laravel-magiclink affected?
Yes, cesargb/laravel-magiclink is affected in releases prior to 2.25.1. Upgrade your dependency to 2.25.1 or later.
What is the CVSS score of GHSA-r33w-fg8j-9c94?
GHSA-r33w-fg8j-9c94 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-r33w-fg8j-9c94?
GHSA-r33w-fg8j-9c94 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Packagist dependencies for GHSA-r33w-fg8j-9c94?
Run the dependency tree command: 'inspect dependencies for cesargb/laravel-magiclink'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r33w-fg8j-9c94",
  "modified" : "2026-02-12T22:11:56Z",
  "published" : "2026-02-12T22:11:56Z",
  "aliases" : [ ],
  "summary" : "MagicLink: Insecure Deserialization of MagicLink Actions Leads to Remote Code Execution",
  "details" : "## Description\n\nMagicLink 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.\n\n## Resolution\n\nThe 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" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cesargb/laravel-magiclink"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.25.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cesargb/laravel-magiclink/security/advisories/GHSA-r33w-fg8j-9c94"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cesargb/laravel-magiclink"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cesargb/laravel-magiclink/releases/tag/v2.25.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-12T22:11:56Z",
    "nvd_published_at" : null
  }
}