CVE-2024-58266

Description

A flaw was found in shlex. The shlex crate improperly handles unquoted and unescaped curly brace and non-breaking space characters, allowing a local attacker to inject arbitrary commands. This injection occurs when processing input that contains these characters without proper quoting or escaping. Successful exploitation results in the execution of attacker-controlled commands. This can lead to arbitrary code execution.

Statement

This CVE was rated as Low severity. It involves three distinct issues: (1) Failure to quote characters, which can cause a single argument to be interpreted as multiple arguments in a shell, but does not directly allow arbitrary command execution; (2) Handling of null bytes in strings, which cannot be used in Unix command arguments or environment variables, making exploitation in typical environments unlikely; and (3) Lack of escaping for control characters in interactive shells, where writing control characters to the input of an interactive shell could cause misbehavior, though non-interactive shells are unaffected. Exploitation of these issues requires high attack complexity and targeting of uncommon scenarios. The overall impact is limited, and the affected scenarios are constrained in typical usage. Considering the high attack complexity, restricted exploitability, and limited impact, a Low severity rating is appropriate.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score3.29.8N/A
Attack VectorLocalNetworkN/A
Attack ComplexityHighLowN/A
Privileges RequiredNoneNoneN/A
User InteractionNoneNoneN/A
ScopeChangedUnchangedN/A
ConfidentialityNoneHighN/A
Integrity ImpactLowHighN/A
Availability ImpactNoneHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N

NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Application Data

The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.

Integrity,Confidentiality,Availability,Access Control

Technical Impact: Execute Unauthorized Code or Commands

The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.

Confidentiality

Technical Impact: Bypass Protection Mechanism

The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.

Frequently Asked Questions

Want to get errata notifications? Sign up here.