
Reproduction of cve-2025-0282-ivanti_rce_reproduction
CVSS 9.0 — CRITICAL | Actively Exploited Zero-Day | Discovered January 2025
CVE-2025-0282 is a stack-based buffer overflow vulnerability (CWE-121 / CWE-787) in the IFT/TLS handling component of Ivanti Connect Secure (ICS), Ivanti Policy Secure (IPS), and Ivanti ZTA Gateways. The flaw allows an unauthenticated, remote attacker to achieve arbitrary code execution on the target appliance with root privileges.
The vulnerability was disclosed on January 8, 2025 after being observed in active exploitation as a zero-day. It was attributed to the China-nexus threat actor tracked as UNC5337 by Mandiant. CISA added this CVE to its Known Exploited Vulnerabilities (KEV) catalog within 72 hours of public disclosure.
The vulnerability resides in the IFT (Internal Forwarding Table) / TLS packet processing path of the appliance's HTTPS management interface. When parsing malformed TLS handshake messages or specially crafted IFT frames, the code copies attacker-controlled data into a fixed-size stack buffer without proper bounds checking:
memcpy(stack_buffer, attacker_data, attacker_controlled_length); // no length check
Because the destination buffer resides on the stack, an oversized payload overwrites:
| Product | Affected Versions | Fixed Version |
|---|---|---|
| Ivanti Connect Secure | < 22.7R2.5 | 22.7R2.5 |
| Ivanti Policy Secure | < 22.7R1.2 | 22.7R1.2 |
| ZTA Gateways | < 22.7R2.3 | 22.7R2.3 |
Note: Ivanti has confirmed that the 22.6 release line is also vulnerable. Customers still on ICS 9.x or 22.4 are equally exposed.
sslvpn or dsaccess services/tmp/*.py, .sslvpn_config_upload, or unexpected cron entriesscapy, socket, and ssl Python modulesClone this repository:
git clone https://github.com/your-org/cve-2025-0282-reproduction
cd cve-2025-0282-reproduction
Install dependencies:
pip install -r requirements.txt
(Requirements: scapy, argparse, socket — socket is stdlib)
Run the PoC against your target:
python exploit.py --target 192.168.1.100 --port 8443
To specify a custom payload size:
python exploit.py --target 192.168.1.100 --port 8443 --payload-size 4096
Enable debug output:
python exploit.py --target 192.168.1.100 --port 8443 --verbose
memcpy into a 1024-byte stack buffer without bounds checkingImportant: The code provided is for educational and authorized testing only. It demonstrates the buffer overflow condition and will cause a denial of service (crash) on unpatched targets. Running this against systems you do not own or have written permission to test is illegal.
See exploit.py in this repository.
The script accepts the following arguments:
usage: exploit.py [-h] --target TARGET [--port PORT] [--payload-size PAYLOAD_SIZE] [--verbose]
CVE-2025-0282 Ivanti Stack Buffer Overflow Reproduction PoC
options:
-h, --help show this help message and exit
--target TARGET Target Ivanti appliance IP or hostname
--port PORT Target port (default: 8443)
--payload-size PAYLOAD_SIZE
Size of overflow payload in bytes (default: 4096)
--verbose Enable verbose/debug output
This repository is provided for authorized security research and educational purposes only. The authors are not responsible for any misuse of this code. Unauthorized exploitation of CVE-2025-0282 is illegal and unethical. Always obtain explicit written permission before testing any system.
| Field | Detail |
|---|
| Vector | Network |
| Complexity | Low |
| Privileges | None |
| User Interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity | High |
| Availability | High |
| Action | Detail |
|---|
| Patch immediately | Upgrade to ICS >=22.7R2.5, IPS >=22.7R1.2, ZTA >=22.7R2.3 |
| Restrict network access | Limit HTTPS management interface to trusted IPs only |
| Enable MFA | Mitigates post-exploitation lateral movement |
| Monitor logs | Watch for TLS anomalies and unexpected process crashes |
| Hunt for IOCs | Check for UNC5337 TTPs (credential dumping, tunnel tools) |