Magma Type Confusion Vulnerability in NAS Message Decoding Allows Arbitrary Code Execution or Denial-of-Service

Vulnerability

A type confusion vulnerability has been identified in the NAS message decoding function of Magma versions through 1.8.0. This vulnerability allows attackers to execute arbitrary code or cause a denial-of-service condition by sending a crafted NAS packet. The issue arises from improper handling of the packet's contents, leading to memory corruption that can be exploited under certain conditions.

Impact

Exploitation of this vulnerability can result in arbitrary code execution or a denial-of-service condition, causing the affected system to crash or become unresponsive.

Reproduction

The vulnerability can be reproduced by sending a specially crafted NAS packet to the Magma 5G core network. This can be done over the N2 interface, which is used for communication between the Access and Mobility Management Function (AMF) and the Radio Access Network (RAN). The crafted packet should exploit the type confusion in the NAS message handling, particularly by manipulating the message to trigger the uninitialized memory access or buffer overflow conditions.

Remediation

Users can upgrade to Magma version 1.9.0 or later, where this vulnerability has been fixed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
1.4
impact
7.5
exploitability
8.8
remediation
7.7
relevance
0.0
threat
4.8
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.