
Python scanner and two-stage proof-of-concept exploit for CVE-2025-15503, an unauthenticated JSP file upload RCE in Sangfor OSM 3.0.0-3.0.8.

Fast YAML-based vulnerability scanner with template-driven detection engine for automated security testing across web apps, APIs, networks, DNS, and cloud infrastructure.

Open-source web application security scanner for automated vulnerability detection, manual penetration testing, and API security testing with a proxy-based interception engine.

This repository contains the scanner component for Greenbone Community Edition.
Metadata
Field Value
CVE CVE-2025-15503
Severity critical
CVSS 9.8 (NVD, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H); record lists N/A, vuldb secondary is 7.3
CWE CWE-434 (Unrestricted Upload of File with Dangerous Type)
Product Sangfor Operation and Maintenance Management System (OSM)
Affected 3.0.0 up to and including 3.0.8
Fixed in post 3.0.8 (vendor advisory: update to the latest release)
Class Unrestricted file upload, JSP execution (RCE-class)
Runtime Python 3.8+ stdlib only (no third-party deps)
Summary
Sangfor Operation and Maintenance Management System <= 3.0.8 contains an unrestricted file upload vulnerability caused by manipulation of the "File" argument in /fort/trust/version/common/common.jsp, letting remote attackers upload arbitrary files; the exploit requires no special privileges.
Full description
The JSP endpoint /fort/trust/version/common/common.jsp ingests the multipart "File" part unfiltered and stores it as a .jsp page under /fort/trust/version/common/. Because the stored page is then compiled and executed by the container, an unauthenticated remote attacker can plant a JSP that runs arbitrary scriptlets server-side: the canonical probe prints the md5 of a random numeric value and then deletes itself via application.getRealPath(request.getServletPath()), which gives a non-guessable, self-cleaning confirmation of code execution. The NVD entry (published 2026-01-10) marks versions 3.0.0-3.0.8 affected with NVD CVSS 9.8 (Critical); the vendor did not respond to the disclosure. Impact: remote attackers can upload arbitrary files, potentially leading to remote code execution or system compromise.
Detection model
- Stage 1: POST /fort/trust/version/common/common.jsp with a raw
multipart/form-data body (boundary ----WebKitFormBoundary), one
file part named "file", filename {randstr}.jsp, Content-Type
image/png, body = the 4-line probe JSP printing md5({randnum}).
- Stage 1 matchers (template condition: and, internal):
status_code == 200 AND body contains "Upload success".
- Stage 2 (only when stage 1 matched, per flow: http(1) && http(2)):
GET /fort/trust/version/common/{randstr}.jsp.
- Stage 2 matchers (template condition: and): status_code == 200
AND body contains md5(to_string(randnum)).
- Both stages must pass; max-request 2; one token = 12-char md5
prefix of the answered probe JSP body.
Usage
Scanner (batch, streamed CSV):
python3 scanner/CVE-2025-15503/scanner.py urls.txt [threads] [out.csv] [--json out.json]
Example:
python3 scanner/CVE-2025-15503/scanner.py urls.txt 8 report.csv --json report.json
python3 exploit/CVE-2025-15503/exploit.py <target> [--csv out.csv] [--json out.json] [--verbose]
Example:
python3 exploit/CVE-2025-15503/exploit.py http://localhost:8080 --csv ex.csv --json ex.json --verbose
Example scanner output
RCE POC SUITE :: CVE-2025-15503
Sangfor OSM <= 3.0.8 - Arbitrary File Upload
scanner : CVE-2025-15503 v1.0.0
threads : 4 | csv: report.csv | json: report.json
[2026-12-03 03:44:55] loaded 1 target(s) from urls.txt
[2026-12-03 03:44:55] [1/1] http://localhost:8080 -> VULNERABLE
[2026-12-03 03:44:55] json sidecar saved: report.json
[2026-12-03 03:44:55] summary: total=1 vulnerable=1 not-vuln=0 errors=0
[2026-12-03 03:44:55] timing : avg=21ms max=21ms wall=0.02s
[2026-12-03 03:44:55] report saved: report.csv
Scanner report columns
n 1-based target index
url target as loaded (scheme auto-prepended when missing)
status ok | error
vulnerable True/False verdict from check()
elapsed_ms per-target timing
token 12-char md5 over the answered probe JSP body
result_b64 base64(JSON) per-target details (matcher flags, randnum, randstr, expected md5, attempt log)
Files
scanner/CVE-2025-15503/scanner.py batch black-box scanner
scanner/CVE-2025-15503/README.md this document
scanner/CVE-2025-15503/DESCRIPTION.md architecture and probe plan
exploit/CVE-2025-15503/exploit.py two-stage POC
Exit codes
0 at least one target answered and was classified
2 no targets loaded, or every target errored (scanner); POC ended
with "verdict: verification failed"
References
nuclei template: http/cves/2025/CVE-2025-15503.yaml
NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-15503
GHSA: https://github.com/advisories/GHSA-h49h-jpp7-xv85
If you want the exploit, find it here: https://satoshidisk.com/pay/CT4uhZ