{"id":2802,"date":"2026-04-20T08:50:04","date_gmt":"2026-04-20T08:50:04","guid":{"rendered":"https:\/\/www.serverspan.com\/blog\/"},"modified":"2026-04-20T08:50:04","modified_gmt":"2026-04-20T08:50:04","slug":"cups-rce-on-linux-vps-cve-2026-34980-chains-to-root-check-if-you-are-exposed-right-now","status":"publish","type":"post","link":"https:\/\/www.serverspan.com\/en\/blog\/cups-rce-on-linux-vps-cve-2026-34980-chains-to-root-check-if-you-are-exposed-right-now\/","title":{"rendered":"CUPS RCE on Linux VPS: CVE-2026-34980 Chains to Root \u2014 Check If You Are Exposed Right Now"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Two vulnerabilities published on April 2, 2026 \u2014 CVE-2026-34980 and CVE-2026-34990 \u2014 chain into a complete unauthenticated remote-to-root exploit against any Linux server running CUPS with a shared PostScript queue reachable on the network. Active exploitation has been confirmed. The fix is a one-liner if you do not print, and a single package upgrade if you do. Run the check below right now before reading the rest.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl is-active cups 2&gt;\/dev\/null || echo \"CUPS not running\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If this returns <code>active<\/code>, your server is exposed until you take action. If it returns <code>inactive<\/code>, <code>unknown<\/code>, or <code>CUPS not running<\/code>, you are not immediately at risk from the network vector \u2014 but check whether the package itself is installed, because CVE-2026-34990 has a local privilege escalation path that matters even if the service is down.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why VPS Servers Are the Primary Target<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">CUPS was not designed for server environments. It is a desktop printing subsystem. The problem is that many base OS images shipped by distributions \u2014 and pulled into VPS templates \u2014 install CUPS as a recommended dependency of other packages, often without any explicit request from the operator. A Rocky Linux or Ubuntu Server system provisioned from a standard image can have <code>cupsd<\/code> running on port 631, listening for connections, despite the VPS never having seen a printer in its existence.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the attack surface that makes CVE-2026-34980 disproportionately dangerous for cloud infrastructure compared to desktop systems. On a desktop, CUPS is expected to be present and a local firewall typically blocks port 631 from external access. On a VPS, the same port is often open to the internet because nobody thought to audit a print daemon on a web server. According to the researcher who discovered the chain, the prerequisites \u2014 a network-exposed cupsd with a shared PostScript queue \u2014 are satisfied in practice across a large portion of Linux servers scanned during responsible disclosure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the Two-CVE Chain Works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding the mechanism matters because it determines which mitigation applies to your situation. The two vulnerabilities are independent at the code level but sequential in the attack path.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CVE-2026-34980 \u2014 Unauthenticated RCE as lp<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CUPS accepts anonymous Print-Job requests to shared queues by default \u2014 the authentication check only blocks remote jobs to non-shared queues. The vulnerability is a parsing flaw in how <code>cupsd<\/code> handles the <code>page-border<\/code> option value submitted as <code>textWithoutLanguage<\/code> in a crafted IPP request. An attacker embeds a newline character inside the option value. CUPS preserves the newline through its option escaping and reparse stage, then reparses the resulting second line as a trusted PPD scheduler control record rather than as user-supplied data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A follow-up raw print job exploits the injected control record to instruct the scheduler to execute an existing binary on the server \u2014 the researcher used <code>\/usr\/bin\/vim<\/code> as a proof-of-concept, but any binary reachable by the <code>lp<\/code> account works. The attacker now has code execution as the <code>lp<\/code> service account. This by itself is serious but not game over \u2014 <code>lp<\/code> is a low-privilege account and cannot directly read sensitive files or write to system paths. That is where the second CVE enters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CVE-2026-34990 \u2014 lp to Root via Localhost IPP Token Abuse<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The second flaw exists in the default CUPS authorization policy for localhost connections. CUPS issues reusable <code>Authorization: Local<\/code> tokens for local connections and \u2014 critically \u2014 the <code>CUPS-Create-Local-Printer<\/code> IPP operation is not gated behind admin authentication when the request originates from localhost in the default policy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With code execution as <code>lp<\/code>, the attacker coerces <code>cupsd<\/code> to authenticate to an attacker-controlled IPP service on a chosen localhost port. CUPS hands over a local token. The attacker reuses that token to issue <code>\/admin\/<\/code> requests directly against the live cupsd instance. Using <code>CUPS-Create-Local-Printer<\/code> with <code>printer-is-shared=true<\/code> and a <code>file:\/\/\/<\/code> URI, the attacker registers a fake printer pointing to any file path on the system. The normal <code>FileDevice<\/code> policy rejects <code>file:\/\/<\/code> URIs \u2014 but this bypass sidesteps it via the <code>Create-Local-Printer<\/code> path. Triggering a print job to that fake printer gives an arbitrary root file overwrite. The published proof-of-concept drops a sudoers fragment granting the attacker full root command execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The full chain: unauthenticated network attacker \u2192 IPP print job \u2192 RCE as lp \u2192 localhost token capture \u2192 admin API access \u2192 file overwrite as root \u2192 sudoers entry \u2192 root shell. No credentials required at any stage for the initial entry.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Affected Versions and Patch Status<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Both CVEs affect CUPS versions 2.4.16 and earlier. OpenPrinting released <strong>CUPS 2.4.17<\/strong> on April 16, 2026, which fixes CVE-2026-34980 (control character filtering in option values) and CVE-2026-34990 (local certificate handling over the loopback interface), along with four additional CVEs patched in the same release.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Distribution-level patch availability as of April 20, 2026:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Distribution<\/th><th>CVE-2026-34980 status<\/th><th>CVE-2026-34990 status<\/th><th>Action<\/th><\/tr><\/thead><tbody><tr><td>Ubuntu 22.04 \/ 24.04<\/td><td>Patch in progress<\/td><td>Patch in progress<\/td><td>Disable or block port 631 immediately<\/td><\/tr><tr><td>Debian 11 Bullseye<\/td><td>Vulnerable (2.3.3op2)<\/td><td>Vulnerable<\/td><td>Disable or block port 631 immediately<\/td><\/tr><tr><td>Debian 12 Bookworm<\/td><td>Vulnerable (2.4.2)<\/td><td>Vulnerable<\/td><td>Disable or block port 631 immediately<\/td><\/tr><tr><td>Rocky Linux 8 \/ 9<\/td><td>Red Hat advisory active<\/td><td>Red Hat advisory active<\/td><td>Disable or apply available advisory update<\/td><\/tr><tr><td>AlmaLinux 8 \/ 9<\/td><td>Red Hat advisory active<\/td><td>Red Hat advisory active<\/td><td>Disable or apply available advisory update<\/td><\/tr><tr><td>openSUSE \/ SLES<\/td><td>SUSE advisory active<\/td><td>SUSE advisory active<\/td><td>Apply zypper security update<\/td><\/tr><tr><td>Arch Linux<\/td><td>cups 2.4.17 in repos<\/td><td>cups 2.4.17 in repos<\/td><td><code>pacman -Syu<\/code><\/td><\/tr><tr><td>Alpine Linux<\/td><td>Check aports tracker<\/td><td>Check aports tracker<\/td><td>Disable or <code>apk upgrade cups<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For distributions where the patched package is not yet available in the official repositories, disabling the service entirely is the correct mitigation \u2014 not waiting. A VPS that does not use a printer has no reason to run <code>cupsd<\/code> at all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 \u2014 Full Exposure Check<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run this block in your VPS console or over SSH. It checks whether the service is running, which version is installed, and whether port 631 is reachable externally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Check if cupsd is running\nsystemctl is-active cups 2&gt;\/dev\/null &amp;&amp; echo \"EXPOSED: cupsd is active\" || echo \"cupsd not running\"\n\n# Check installed version\ncups-config --version 2&gt;\/dev\/null || dpkg -l cups 2&gt;\/dev\/null | grep ^ii || rpm -q cups 2&gt;\/dev\/null\n\n# Check if port 631 is listening and on which interface\nss -tlnp | grep 631<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The third command is the most important. If port 631 shows <code>0.0.0.0:631<\/code> or <code>:::631<\/code>, the daemon is listening on all interfaces and is reachable from the internet. If it shows <code>127.0.0.1:631<\/code>, the network-attack vector of CVE-2026-34980 is blocked \u2014 but CVE-2026-34990&#8217;s local privilege escalation path still applies if any local user accounts exist on the machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2a \u2014 If Your VPS Does Not Print (Most VPS Workloads)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Stop and permanently disable CUPS. Also disable <code>cups-browsed<\/code> if present, as it is a separate service that participates in the 2024 CUPS vulnerability chain and has no purpose on a server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Stop and disable the main CUPS scheduler\nsystemctl stop cups\nsystemctl disable cups\nsystemctl mask cups\n\n# Stop and disable cups-browsed if installed\nsystemctl stop cups-browsed 2&gt;\/dev\/null\nsystemctl disable cups-browsed 2&gt;\/dev\/null\nsystemctl mask cups-browsed 2&gt;\/dev\/null\n\n# Verify both are gone\nsystemctl is-active cups cups-browsed 2&gt;\/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>mask<\/code> command goes beyond <code>disable<\/code> \u2014 it symlinks the service unit to <code>\/dev\/null<\/code>, which prevents any other package or process from starting it back up as a dependency. On Alpine Linux (OpenRC), the equivalent is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rc-service sshd stop       # stop if running\nrc-update del cups         # remove from runlevel\nrc-update del cups-browsed 2&gt;\/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On FreeBSD, prevent it from starting at boot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysrc cupsd_enable=\"NO\"\nservice cupsd stop 2&gt;\/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After masking, run the exposure check block again and confirm port 631 no longer appears in the <code>ss<\/code> output.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2b \u2014 If Your VPS Runs a Print Server (Patch Required)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you are running CUPS deliberately \u2014 for example, a shared office print server or a workstation-style VPS with a GUI \u2014 disabling the service is not an option. The correct action is to upgrade to CUPS 2.4.17, the only release that patches both CVEs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On Arch Linux, where 2.4.17 is already in the repos:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pacman -Syu cups<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On distributions where 2.4.17 is not yet available through the system package manager, apply the available security advisory update as a partial mitigation and add a firewall rule immediately to restrict port 631 to trusted source IPs only:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Ubuntu \/ Debian \u2014 block external access to CUPS port\nufw deny 631\/tcp\nufw deny 631\/udp\nufw reload<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Rocky Linux \/ AlmaLinux \/ RHEL\nfirewall-cmd --permanent --remove-service=mdns\nfirewall-cmd --permanent --add-rich-rule='rule family=\"ipv4\" port port=\"631\" protocol=\"tcp\" reject'\nfirewall-cmd --permanent --add-rich-rule='rule family=\"ipv4\" port port=\"631\" protocol=\"udp\" reject'\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The firewall rule neutralizes the network vector of CVE-2026-34980 without disabling printing functionality for local users. CVE-2026-34990 remains a risk as long as the service is running and unprivileged accounts have local access, so the CUPS 2.4.17 upgrade is still required as soon as the patched package reaches your distribution&#8217;s repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2014 Verify the Fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After applying either mitigation, confirm the state with a final check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Confirm service is not running (disable path)\nsystemctl is-active cups &amp;&amp; echo \"WARNING: still active\" || echo \"OK: not running\"\n\n# Confirm port 631 is no longer exposed (both paths)\nss -tlnp | grep 631 &amp;&amp; echo \"WARNING: port still open\" || echo \"OK: port 631 not listening\"\n\n# Confirm mask is in place (disable path)\nsystemctl is-enabled cups<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The last command should return <code>masked<\/code>, not <code>disabled<\/code>. A masked unit cannot be started by any trigger, including package updates. A merely disabled unit can be started manually or as a dependency \u2014 masking is the correct state for a service you intentionally removed from a server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Broader Hardening Context<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The CUPS situation is a specific instance of a general problem: services that belong to workstation environments end up on servers because base OS images are built for breadth, not for minimal attack surface. A freshly installed Ubuntu Server or Rocky Linux VPS can be running a print daemon, an Avahi mDNS responder, a Bluetooth stack stub, and an SNMP agent \u2014 none of which belong on a cloud server, all of which have historical CVE track records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The correct long-term practice is an explicit audit of running services immediately after provisioning a new VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl list-units --type=service --state=running<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Any service that you cannot explain a specific reason for should be stopped and masked. This brings the VPS to a minimal running state where the attack surface matches the actual workload, not the default assumptions of a desktop package manifest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need help auditing and hardening a VPS \u2014 including identifying unexpected running services, configuring firewall rules, and applying pending security advisories \u2014 the <a href=\"https:\/\/www.serverspan.com\/en\/linux-administration\">ServerSpan managed Linux administration service<\/a> covers this class of work directly. For newly provisioned servers that need a clean starting point, all <a href=\"https:\/\/www.serverspan.com\/en\/virtual-servers\">ServerSpan VPS plans<\/a> include full root access and console availability so you can apply these steps immediately after provisioning.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Summary of required actions as of April 20, 2026:<\/strong> If your VPS is running CUPS and you do not need it \u2014 stop, disable, and mask the service right now. If you need CUPS and are on Arch Linux, upgrade to 2.4.17 via <code>pacman -Syu<\/code>. If you need CUPS on any other distribution where 2.4.17 is not yet in the repos, add a firewall rule blocking port 631 externally and watch for the patched package. No patch, no exception \u2014 CVE-2026-34990 gives root to any local user on a default CUPS configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two vulnerabilities published on April 2, 2026 \u2014 CVE-2026-34980 and CVE-2026-34990 \u2014 chain into a complete unauthenticated remote-to-root exploit against any Linux server running CUPS with a shared PostScript queue reachable on the network. Active exploitation has been confirmed. The fix is a one-liner if you do not print, and a single package upgrade if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2803,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15720,15717,15711,15727,15728,15732,15723,15706,15729,15715,15725,15712,15704,15718,15719,15708,15731,15721,15709,15713,15705,15716,15707,15726,15710,15730,15724,15733,15714,15722],"class_list":["post-2802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting-news","tag-block-cups-firewalld-rocky-linux","tag-block-cups-port-631-ufw-firewall","tag-cups-2-4-17-security-update","tag-cups-active-exploitation-confirmed-2026","tag-cups-alpine-linux-disable-openrc","tag-cups-arbitrary-file-overwrite-root-sudoers","tag-cups-cups-browsed-network-exposed-server","tag-cups-exploit-chain-unauthenticated-remote-code-execution","tag-cups-freebsd-disable-rc-conf","tag-cups-port-631-exposed-vps","tag-cups-postscript-queue-exploit","tag-cups-rce-lp-to-root-chain","tag-cups-rce-vulnerability-cve-2026-34980-linux-server-fix","tag-cups-unauthenticated-print-job-exploit","tag-cups-vps-server-attack-surface","tag-cups-vulnerability-april-2026-patch","tag-cups-vulnerability-base-os-image-vps","tag-cups-browsed-disable-linux-server","tag-cve-2026-34980-openprinting-cups-fix","tag-cve-2026-34980-page-border-parsing-injection","tag-cve-2026-34990-cups-privilege-escalation-root","tag-cve-2026-34990-localhost-ipp-token-abuse","tag-disable-cups-linux-vps-security","tag-disable-cups-ubuntu-debian-rocky-almalinux","tag-how-to-check-if-cups-is-running-linux","tag-linux-vps-service-hardening-audit","tag-openprinting-cups-scheduler-rce-2026","tag-serverspan-vps-security-hardening-linux","tag-stop-disable-mask-cups-systemctl","tag-systemctl-mask-cups-security-hardening"],"_links":{"self":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2802"}],"version-history":[{"count":1,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2802\/revisions"}],"predecessor-version":[{"id":2804,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2802\/revisions\/2804"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/2803"}],"wp:attachment":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}