Security Vulnerability Report
中文
CVE-2026-41526 CVSS 6.5 MEDIUM

CVE-2026-41526

Published: 2026-04-28 08:16:02
Last Modified: 2026-05-05 17:25:07

Description

In KDE KCoreAddons before 6.25, KShell::quoteArgs is intended to safely quote arguments so that they can be passed to a shell command. This parsing does not adequately handle metacharacters, leading to an escape from the shell. All applications relying on this method in a security-critical path to handle user input are affected and could be exploited. In particular, because sendInput() sends a string to a terminal, a control character such as \x01 can be used during injection.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:kde:kcoreaddons:*:*:*:*:*:*:*:* - VULNERABLE
KDE KCoreAddons < 6.25

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <iostream> #include <QString> #include <KShell> // PoC for CVE-2026-41526 // Demonstrates improper handling of control characters in KShell::quoteArgs int main() { // Input containing a control character intended to escape the shell context QString payload = "normal_arg\x01; echo 'VULNERABLE'"; // The vulnerable function attempts to quote the argument QString quotedArg = KShell::quoteArg(payload); // If the quote logic fails to sanitize \x01, passing this to a shell // via system() or similar functions allows command execution. std::cout << "Quoted Output: " << quotedArg.toStdString() << std::endl; return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41526", "sourceIdentifier": "[email protected]", "published": "2026-04-28T08:16:01.647", "lastModified": "2026-05-05T17:25:06.683", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In KDE KCoreAddons before 6.25, KShell::quoteArgs is intended to safely quote arguments so that they can be passed to a shell command. This parsing does not adequately handle metacharacters, leading to an escape from the shell. All applications relying on this method in a security-critical path to handle user input are affected and could be exploited. In particular, because sendInput() sends a string to a terminal, a control character such as \\x01 can be used during injection."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.0, "impactScore": 5.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-150"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:kde:kcoreaddons:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.25.0", "matchCriteriaId": "B9E0D1D8-4EAB-491A-8678-D3183FA933CB"}]}]}], "references": [{"url": "https://github.com/KDE/kcoreaddons/blob/50d360736c399502fedf203e95482b0d0e5a3ea2/src/lib/util/kshell.h#L168", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/KDE/kcoreaddons/blob/50d360736c399502fedf203e95482b0d0e5a3ea2/src/lib/util/kshell.h#L43-L49", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/KDE/kcoreaddons/releases/tag/v6.25.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://invent.kde.org/frameworks/kcoreaddons/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://kde.org/info/security/advisory-20260427-1.txt", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}