Summary
KDE Dolphin contains an OS command injection vulnerability in handling crafted folder names used by the view-background double-click action. If a victim opens the affected view and double-clicks its background, attacker-controlled directory-name content may escape intended quoting and cause shell commands to execute with the victim's privileges.
Affected context
The issue occurs in KDE Dolphin versions 24.08.0 through 26.08.2 when a folder name is substituted into a command-related path placeholder used by slotDoubleClickViewBackground. Exploitation depends on a crafted directory name reaching this code path and a user double-clicking the view background, allowing the name to influence shell command interpretation.
Exploit preconditions
- Attack surface: KDE Dolphin's view-background double-click handling
- Required access: Ability to create, place, or cause the victim to access a directory with a crafted name
- Trigger point: The victim double-clicks the background of the affected folder view
- Why exploitation is possible: Folder-name data is incorporated into a command context without reliably preventing shell metacharacters from altering command boundaries
- User interaction: Required; exploitation is not expected to occur solely from opening Dolphin
Why this happens
The vulnerability results from treating a filesystem path or folder name as command-language content rather than as data. When attacker-controlled text is inserted into a shell command or command-like template without robust argument separation and escaping, quoting can be broken and shell metacharacters may be interpreted as operators. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.
Potential impact
- An attacker may execute arbitrary commands with the privileges of the Dolphin process.
- Local files and user data could be read, modified, or deleted.
- Malware or persistence mechanisms could be installed in the affected user's account.
- The compromise could be used to access other resources available to the user.
General mitigation guidance
Mitigation generally focuses on removing shell interpretation from path-handling workflows and reducing trust in filesystem metadata.
Common defensive patterns include:
- Invoke programs directly with structured argument arrays rather than constructing shell command strings.
- Treat folder names and paths strictly as data, with explicit argument boundaries.
- Avoid command templates that interpolate user-controlled or filesystem-derived text.
- Apply context-appropriate validation and reject unexpected control characters where feasible.
- Run desktop applications with least privilege and limit access to sensitive resources.
- Use secure-by-default process-launching APIs and centralize command execution behind reviewed interfaces.
How teams detect issues like this
Organizations can look for command-injection risks through:
- Static analysis rules identifying shell command construction with path, filename, or folder-name variables.
- Code review checks for string interpolation, concatenation, or placeholder substitution in process-launching code.
- Testing with filenames containing shell-sensitive characters in isolated environments.
- Policy enforcement requiring structured process APIs instead of shell-evaluated commands.
- Endpoint monitoring for unexpected child processes launched by the file manager.
Automated code-review and software-composition tools may help identify related unsafe command-handling patterns.

