Description
This module exploits a Stack-based Buffer Overflow vulnerability in Ivanti Connect Secure to achieve remote code execution (CVE-2025-22457). Versions 22.7R2.5 and earlier are vulnerable. Note that Ivanti Pulse Connect Secure, Ivanti Policy Secure and ZTA gateways are also vulnerable but this module doesn't support this software. Heap spray is used to place our payload in memory at a predetermined location. Due to ASLR, the base address of `libdsplibs` is unknown. This library is used by the exploit to build a ROP chain and get command execution. As a result, the module will brute force this address starting from the address set by the `LIBDSPLIBS_ADDRESS` option.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/http/ivanti_connect_secure_stack_overflow_rce_cve_2025_22457msf undefined(ivanti_connect_secure_stack_overflow_rce_cve_2025_22457) > show actions ...actions...msf undefined(ivanti_connect_secure_stack_overflow_rce_cve_2025_22457) > set ACTION < action-name >msf undefined(ivanti_connect_secure_stack_overflow_rce_cve_2025_22457) > show options ...show and set options...msf undefined(ivanti_connect_secure_stack_overflow_rce_cve_2025_22457) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub