CVE-2024-58266
Multiple issues involving quote API in shlex
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.2
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
CVE-2024-58266- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2024-54826
3.2
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
EUVD-2024-54826- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-r7qv-8r2h-pg27
3.2
Multiple issues involving quote API in shlex
Issue 1: Failure to quote characters
Affected versions of this crate allowed the bytes { and \xa0 to appear unquoted and unescaped in command arguments.
If the output of quote or join is passed to a shell, then what should be a single command argument could be interpreted as multiple arguments.
This does not directly allow arbitrary command execution (you can't inject a command substitution or similar). But depending on the command you're running, being able to inject multiple arguments where only one is expected could lead to undesired consequences, potentially including arbitrary command execution.
The flaw was corrected in version 1.2.1 by escaping additional characters. Updating to 1.3.0 is recommended, but 1.2.1 offers a more minimal fix if desired.
Workaround: Check for the bytes { and \xa0 in quote/join input or output.
(Note: { is problematic because it is used for glob expansion. \xa0 is problematic because it's treated as a word separator in specific environments.)
Issue 2: Dangerous API w.r.t. nul bytes
Version 1.3.0 deprecates the quote and join APIs in favor of try_quote and try_join, which behave the same except that they have Result return type, returning Err if the input contains nul bytes.
Strings containing nul bytes generally cannot be used in Unix command arguments or environment variables, and most shells cannot handle nul bytes even internally. If you try to pass one anyway, then the results might be security-sensitive in uncommon scenarios. More details here.
Due to the low severity, the behavior of the original quote and join APIs has not changed; they continue to allow nuls.
Workaround: Manually check for nul bytes in quote/join input or output.
Issue 3: Lack of documentation for interactive shell risks
The quote family of functions does not and cannot escape control characters. With non-interactive shells this is perfectly safe, as control characters have no special effect. But if you writing directly to the standard input of an interactive shell (or through a pty), then control characters can cause misbehavior including arbitrary command injection.
This is essentially unfixable, and has not been patched. But as of version 1.3.0, documentation has been added.
Future versions of shlex may add API variants that avoid the issue at the cost of reduced portability.
- Record
GHSA-r7qv-8r2h-pg27- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Updated
- 2026-11-02
NVD
3.2
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
CVE-2024-58266- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-116
- Updated
- 2026-11-02
OSV
3.2
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
CVE-2024-58266- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-58266
9.8
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
DEBIAN-CVE-2024-58266- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 12 moreShow less
OSVGHSA-r7qv-8r2h-pg27
3.2
Multiple issues involving quote API in shlex
Issue 1: Failure to quote characters
Affected versions of this crate allowed the bytes { and \xa0 to appear unquoted and unescaped in command arguments.
If the output of quote or join is passed to a shell, then what should be a single command argument could be interpreted as multiple arguments.
This does not directly allow arbitrary command execution (you can't inject a command substitution or similar). But depending on the command you're running, being able to inject multiple arguments where only one is expected could lead to undesired consequences, potentially including arbitrary command execution.
The flaw was corrected in version 1.2.1 by escaping additional characters. Updating to 1.3.0 is recommended, but 1.2.1 offers a more minimal fix if desired.
Workaround: Check for the bytes { and \xa0 in quote/join input or output.
(Note: { is problematic because it is used for glob expansion. \xa0 is problematic because it's treated as a word separator in specific environments.)
Issue 2: Dangerous API w.r.t. nul bytes
Version 1.3.0 deprecates the quote and join APIs in favor of try_quote and try_join, which behave the same except that they have Result return type, returning Err if the input contains nul bytes.
Strings containing nul bytes generally cannot be used in Unix command arguments or environment variables, and most shells cannot handle nul bytes even internally. If you try to pass one anyway, then the results might be security-sensitive in uncommon scenarios. More details here.
Due to the low severity, the behavior of the original quote and join APIs has not changed; they continue to allow nuls.
Workaround: Manually check for nul bytes in quote/join input or output.
Issue 3: Lack of documentation for interactive shell risks
The quote family of functions does not and cannot escape control characters. With non-interactive shells this is perfectly safe, as control characters have no special effect. But if you writing directly to the standard input of an interactive shell (or through a pty), then control characters can cause misbehavior including arbitrary command injection.
This is essentially unfixable, and has not been patched. But as of version 1.3.0, documentation has been added.
Future versions of shlex may add API variants that avoid the issue at the cost of reduced portability.
- Record
GHSA-r7qv-8r2h-pg27- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-58266
3.2
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
UBUNTU-CVE-2024-58266- CVSS 3.1
- 3.2 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVAZL-66008 No score
CVE-2024-58266 affecting package kata-containers 3.2.0.azl2-7
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
AZL-66008- Updated
- 2026-11-02
OSVAZL-66017 No score
CVE-2024-58266 affecting package rust 1.72.0-14
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
AZL-66017- Updated
- 2026-11-02
OSVAZL-66029 No score
CVE-2024-58266 affecting package rust for versions less than 1.75.0-30
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
AZL-66029- Updated
- 2026-11-05
OSVAZL-66035 No score
CVE-2024-58266 affecting package rust for versions less than 1.86.0-3
The shlex crate before 1.2.1 for Rust allows unquoted and unescaped instances of the { and \xa0 characters, which may facilitate command injection.
- Record
AZL-66035- Updated
- 2026-11-05
OSVopenSUSE-SU-2025:15433-1 No score
framework-inputmodule-control-0.2.0-3.1 on GA media
These are all security issues fixed in the framework-inputmodule-control-0.2.0-3.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15433-1- Updated
- 2026-11-02
OSVRUSTSEC-2024-0006 No score
Multiple issues involving quote API
Issue 1: Failure to quote characters
Affected versions of this crate allowed the bytes { and \xa0 to appear
unquoted and unescaped in command arguments.
If the output of quote or join is passed to a shell, then what should be a
single command argument could be interpreted as multiple arguments.
This does not directly allow arbitrary command execution (you can't inject a command substitution or similar). But depending on the command you're running, being able to inject multiple arguments where only one is expected could lead to undesired consequences, potentially including arbitrary command execution.
The flaw was corrected in version 1.2.1 by escaping additional characters. Updating to 1.3.0 is recommended, but 1.2.1 offers a more minimal fix if desired.
Workaround: Check for the bytes { and \xa0 in quote/join input or
output.
(Note: { is problematic because it is used for glob expansion. \xa0 is
problematic because it's treated as a word separator in specific
environments.)
Issue 2: Dangerous API w.r.t. nul bytes
Version 1.3.0 deprecates the quote and join APIs in favor of try_quote
and try_join, which behave the same except that they have Result return
type, returning Err if the input contains nul bytes.
Strings containing nul bytes generally cannot be used in Unix command arguments or environment variables, and most shells cannot handle nul bytes even internally. If you try to pass one anyway, then the results might be security-sensitive in uncommon scenarios. More details here.
Due to the low severity, the behavior of the original quote and join APIs
has not changed; they continue to allow nuls.
Workaround: Manually check for nul bytes in quote/join input or output.
Issue 3: Lack of documentation for interactive shell risks
The quote family of functions does not and cannot escape control characters.
With non-interactive shells this is perfectly safe, as control characters have
no special effect. But if you writing directly to the standard input of an
interactive shell (or through a pty), then control characters can cause
misbehavior including arbitrary command injection.
This is essentially unfixable, and has not been patched. But as of version 1.3.0, documentation has been added.
Future versions of shlex may add API variants that avoid the issue at the
cost of reduced portability.
- Record
RUSTSEC-2024-0006- Updated
- 2026-11-02
OSVSUSE-SU-2025:03077-1 No score
Security update for rav1e
This update for rav1e fixes the following issues:
- CVE-2024-58266: shlex: Fixed certain bytes allowed to appear unquoted and unescaped in command arguments (bsc#1247207)
- Record
SUSE-SU-2025:03077-1- Updated
- 2026-11-02
OSVSUSE-SU-2025:03092-1 No score
Security update for rav1e
This update for rav1e fixes the following issues:
- Update crate shlex to 1.3.0:
- CVE-2024-58266: Fixed command injection (bsc#1247207)
- RUSTSEC-2024-0006: Fixed multiple issues involving quote API (bsc#1230028)
- Record
SUSE-SU-2025:03092-1- Updated
- 2026-11-02
OSVSUSE-SU-2025:20717-1 No score
Security update for rust-keylime
This update for rust-keylime fixes the following issues:
-
Update vendored crate slab to version 0.4.11
- CVE-2025-55159: Fixed incorrect bounds check in get_disjoint_mut function leading to undefined behavior or potential crash due to out-of-bounds access (bsc#1248006)
-
Update to version 0.2.8+12:
- build(deps): bump actions/checkout from 4 to 5
- build(deps): bump cfg-if from 1.0.0 to 1.0.1
- build(deps): bump openssl from 0.10.72 to 0.10.73
- build(deps): bump clap from 4.5.39 to 4.5.45
- build(deps): bump pest from 2.8.0 to 2.8.1
- Fix clippy warnings
- Use verifier-provided interval for continuous attestation timing
- Add meta object with seconds_to_next_attestation to evidence response
- Fix boot time retrieval
- Fix IMA log format (it must be ['text/plain']) (#1073)
- Remove unnecessary configuration fields
- cargo: Bump retry-policies to version 0.4.0
-
Update vendored crate shlex to version 1.3.0
- CVE-2024-58266: Fixed command injection (bsc#1247193)
-
Update to version 0.2.7+141:
- service: Use WantedBy=multi-user.target
- rpm: Add subpackage for push-attestation agent
- push-model: implement continuous attestation with configurable intervals
- Retry registration forever in the state machine
- Add Verifier URL to configuration
- Align exp.backoff to current configuration format
- Increase coverage of state machine (using Context)
- Increase coverage of struct_filler.rs
- Groom code (remove dead code)
- Fix exponential backoff (10secs, 4xx accepted)
- test: Add documentation test to tests/run.sh
- tpm: Avoid running code example during documentation tests
- state_machine: Always start the agent from the Unregistered state
- Add fixes for the URL construction
- Refactor evidences collection in push attestation agent
- push-model: refactor attestation logic into a state machine
- Fix body sending by allowing serializing strings (#1057)
- Log ResilientClient errors/response status codes (#1055)
- Add AK signing scheme and hash algorithm to negotiation
- tpm: Add method to extract signing scheme and hash algorithm from AK
- Allow custom content-type/accept headers
- Integrate exponential backoff to registration (#1052)
- keylime/structures: Rename ShaValues to PcrBanks
- Add resilient_client for exponential backoff (#1048)
-
Update vendored crate openssl 0.10.73:
- CVE-2025-3416: Fixed Use-After-Free in Md::fetch and Cipher::fetch (bsc#1242623)
-
Update to version 0.2.7+117:
- Increase coverage in evidence handling structure
- Add Capabilities Negotiations resp. missing fields
- Fix UEFI test to check file access in all cases
- context_info_handler: Do not assume /var/lib/keylime exists
- Fix clippy warnings about uninlined format arguments
- attestation: Allow unwrap() in tests
- Increase coverage (groom code, extend unit tests)
- Include IMA/UEFI logs in Evidence Handling request
- Include method to get all IMA entries as string
- Send correct list of pcr banks and sign algorithms
- Try to fix TPM tests related issues
- Define attestation perform asynchronous
- Perform attestation in push model agent binary
- Refactor code to use new attestation.rs
- Create attestation.rs for Attestation stuff
- Move ContextInfo management to its own handler
- Adjust context_info.rs after rebase
- Add attestation function to ContextInfo structure
- Add prohibited signing algorithms, avoid ecschnorr
- keylime/config: Use macro to implement PushModelConfigTrait
- Introduce keylime-macros and define_view_trait
- config: Remove KeylimeConfig structure
- config: Remove unnecessary options and lazy initialization
- Fix pcr_bank function to send all possible slots
- Send Content-Type:application/json on request (#1039)
- Send correct 'key_algorithm' in certification_keys (#1035)
- Push Model: Persist Attestation Key to file
- Add Keylime push model binary to root GNUmakefile
- Use…
- Record
SUSE-SU-2025:20717-1- Updated
- 2026-11-02
OSVSUSE-SU-2025:20858-1 No score
Security update for rust-keylime
This update for rust-keylime fixes the following issues:
-
CVE-2025-55159: slab: incorrect bounds check in get_disjoint_mut function can lead to undefined behavior or potential crash due to out-of-bounds access (bsc#1248006)
-
CVE-2025-3416: openssl: Use-After-Free in Md::fetch and Cipher::fetch in rust-openssl crate (bsc#1242623)
-
CVE-2024-58266: shlex: certain bytes allowed to appear unquoted and unescaped in command arguments (bsc#1247193)
-
CVE-2024-43806: rustix: rustix::fs::Dir iterator with the linux_raw backend can cause memory explosion (bsc#1229952)
-
CVE-2024-12224: idna: idna accepts Punycode labels that do not produce any non-ASCII when decoded (bsc#1243861)
-
RUSTSEC-2024-0006: Multiple issues involving quote API (bsc#1230029)
- Record
SUSE-SU-2025:20858-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
shlexcrates.io |
before 1.3.0 | 1.3.0 |
kata-containersAzure Linux:2 |
through 3.2.0.azl2-7 | None known |
rustAzure Linux:2 |
through 1.72.0-14 | None known |
rustAzure Linux:3 |
before 1.75.0-30 | 1.75.0-30 |
rustAzure Linux:3 |
1.85.0 up to 1.86.0-3 | 1.86.0-3 |
rust-shlexDebian:12 |
All versions, plus listed versions 1.1.0-11.2.0-11.3.0-1 |
None known |
rust-shlexDebian:13 |
before 1.3.0-1 | 1.3.0-1 |
rust-shlexDebian:14 |
before 1.3.0-1 | 1.3.0-1 |
shlexcrates.io |
0.0.0-0 up to 1.3.0 | 1.3.0 |
rav1eSUSE:Linux Enterprise Module for Basesystem 15 SP6 |
before 0.6.6-150600.3.6.1 | 0.6.6-150600.3.6.1 |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
rav1eSUSE:Linux Enterprise Module for Basesystem 15 SP7 |
before 0.6.6-150600.3.6.1 | 0.6.6-150600.3.6.1 |
rav1eopenSUSE:Leap 15.6 |
before 0.6.6-150600.3.6.1 | 0.6.6-150600.3.6.1 |
rust-keylimeSUSE:Linux Micro 6.0 From an advisory covering 3 CVEs |
before 0.2.8+12-1.1 | 0.2.8+12-1.1 |
rust-keylimeSUSE:Linux Micro 6.1 From an advisory covering 5 CVEs |
before 0.2.8+12-slfo.1.1_1.1 | 0.2.8+12-slfo.1.1_1.1 |
rust-shlexUbuntu:20.04:LTS |
All versions, plus listed versions 0.1.1-1 |
None known |
rust-shlexUbuntu:22.04:LTS |
All versions, plus listed versions 0.1.1-1 |
None known |
rust-shlexUbuntu:24.04:LTS |
All versions, plus listed versions 1.1.0-11.2.0-11.3.0-1 |
None known |
rust-shlexUbuntu:25.10 |
All versions, plus listed versions 1.3.0-1 |
None known |
rust-shlexUbuntu:26.10 |
All versions, plus listed versions 1.3.0-1 |
None known |
rust-shlexUbuntu:26.04:LTS |
All versions, plus listed versions 1.3.0-1 |
None known |
framework-inputmodule-controlopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 0.2.0-3.1 | 0.2.0-3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-58266 is a low vulnerability (CVSS 3.2) in Comex Shlex, published January 21, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.78%, the 56th percentile. Fixed in shlex 1.3.0.
References
rustsec.org/advisories/RUSTSEC-2024-0006.html
github.com/comex/rust-shlex/security/advisories/GHSA-r7qv-8r2h-pg27
crates.io/crates/shlex
nvd.nist.gov/vuln/detail/CVE-2024-58266
github.com/advisories/GHSA-r7qv-8r2h-pg27
github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58266.json
Show 23 moreShow less
security-tracker.debian.org/tracker/CVE-2024-58266
github.com/comex/rust-shlex
github.com/comex/rust-shlex/commit/4a0724b0b62ef715467875b040a890ce75a8a829
suse.com/support/update/announcement/2025/suse-su-202503077-1
bugzilla.suse.com/1230028
bugzilla.suse.com/1247207
suse.com/security/cve/CVE-2024-58266
suse.com/support/update/announcement/2025/suse-su-202503092-1
suse.com/support/update/announcement/2025/suse-su-202520717-1
bugzilla.suse.com/1242623
bugzilla.suse.com/1247193
bugzilla.suse.com/1248006
suse.com/security/cve/CVE-2025-3416
suse.com/security/cve/CVE-2025-55159
suse.com/support/update/announcement/2025/suse-su-202520858-1
bugzilla.suse.com/1229952
bugzilla.suse.com/1230029
bugzilla.suse.com/1243861
suse.com/security/cve/CVE-2024-12224
suse.com/security/cve/CVE-2024-43806
ubuntu.com/security/CVE-2024-58266
cve.org/CVERecord?id=CVE-2024-58266
suse.com/security/cve/CVE-2023-53156
Left out here: the rest of 1 source description. The JSON record has them.