Nov 20, 2026·9 min read·1 visit
A parsing logic flaw in the uutils coreutils env utility (-S / --split-string mode) causes the process to reject literal backslash sequences inside single quotes and exit with status 125, leading to a local denial of service for dependent scripts and workflows.
CVE-2026-35377 is an improper input validation vulnerability (CWE-20) in the env utility of uutils coreutils, the Rust-based reimplementation of GNU coreutils. When processing command-line arguments with the -S (--split-string) option, the uutils split-string tokenizer erroneously validates backslash sequences enclosed within single quotes against a fixed table of known escape characters. Under standard GNU env behavior, backslashes inside single quotes are treated literally (except for \\ and \'). Because uutils rejects unrecognized sequences such as \a, \x, or \| with exit code 125, automated scripts, shebang invocations, and administrative workflows relying on POSIX/GNU compatibility fail to execute, resulting in a local denial of service.
The uutils coreutils project provides a cross-platform Rust reimplementation of the GNU coreutils suite. Among these utilities is env (implemented in the uu_env subcrate), which executes programs in a modified environment. A critical feature of modern env implementations is the -S (--split-string) flag, which splits a single input string into multiple distinct command-line arguments (argv).
On Linux and POSIX systems, the kernel parses executable script shebang lines (#!) by passing the entire string following the interpreter path as a single argument. System administrators and developers rely on #!/usr/bin/env -S to pass multiple flags, environment variables, or sub-arguments to interpreters like Python, Perl, awk, or grep. Compatibility with GNU env argument splitting semantics is therefore required for system stability when substituting GNU coreutils with uutils coreutils.
CVE-2026-35377 (classified under CWE-20: Improper Input Validation) stems from a behavioral divergence in how uutils parses single-quoted substrings passed to env -S. While GNU env treats backslashes inside single quotes as literal characters (with the sole exceptions of \\ and \'), the uutils tokenizer enforced strict escape sequence validation inside single quotes.
When uutils env -S encounters a backslash followed by a character not present in its internal escape replacement table (for example, \a, \x, \|, \q, or \9) inside single quotes, it halts execution and returns an invalid sequence error with exit code 125. In environments where uutils serves as the default coreutils provider, this breaks legitimate scripts and command wrappers, causing a local denial of service.
To understand the root cause of CVE-2026-35377, it is necessary to examine the state machine governing string splitting in env -S. According to the GNU coreutils specification, -S supports both double-quoted ("...") and single-quoted ('...') strings, applying different escaping rules to each quoting context.
In unquoted contexts and inside double quotes, GNU env -S actively interprets specific backslash escape sequences: \c, \f, \n, \r, \t, \v, \#, \$, \_, \", and \\. If the parser encounters a backslash followed by any other character in an unquoted or double-quoted context, it treats the input as malformed and aborts. Conversely, inside single quotes, GNU env -S suspends escape expansion entirely, treating all characters literally except for \\ and \'. Any other backslash sequence (such as '\x20' or '\a') must be preserved verbatim as two separate characters: the backslash and the following character.
In uutils coreutils, argument tokenization for env -S is handled by the SplitIterator struct located in src/uu/env/src/split_iterator.rs. When SplitIterator operated in the single-quote parsing branch and encountered a backslash, it correctly checked for \\ and \' first. However, for all remaining characters, the implementation checked whether the character following the backslash existed in the REPLACEMENTS lookup array—the table intended for unquoted and double-quoted escape expansion.
Because of a misinterpretation of the GNU test suite during initial development, the SplitIterator match arm restricted literal retention in single quotes exclusively to characters listed in REPLACEMENTS. When a character outside REPLACEMENTS followed a backslash inside single quotes, execution fell through to an error-generating match arm (self.make_invalid_sequence_backslash_xin_minus_s(c)), causing the parser to reject valid literal strings.
The vulnerability resides in src/uu/env/src/split_iterator.rs within the SplitIterator implementation responsible for handling backslash sequences inside single-quoted segments. Prior to patch commit 9d7a0e849109c82262ac2d65324739aac690200f, the single-quote backslash handler contained three match arms after handling ' and \.
// Vulnerable code in src/uu/env/src/split_iterator.rs
Some(c) if REPLACEMENTS.iter().any(|&x| x.0 == c) => {
// See GNU test-suite e11: In single quotes, \t remains as it is.
// Comparing with GNU behavior: \a is not accepted and issues an error.
// So apparently only known sequences are allowed, even though they are not expanded.... bug of GNU?
self.push_char_to_word(BACKSLASH);
self.take_one()?;
Ok(())
}
Some(c) => Err(self.make_invalid_sequence_backslash_xin_minus_s(c)),As indicated by the developer comment in the vulnerable code, the original author observed that \t remained literal in single quotes while \a raised an error in a GNU test case, failing to distinguish that the GNU test case tested \a outside of single quotes. Consequently, uutils enforced the REPLACEMENTS.iter().any(|&x| x.0 == c) guard on single-quoted strings, explicitly rejecting any character c not found in the table.
Commit 9d7a0e849109c82262ac2d65324739aac690200f resolves the issue by removing both the REPLACEMENTS lookup guard and the fallback error branch when parsing inside single quotes:
@@ -279,15 +279,10 @@ impl<'a> SplitIterator<'a> {
self.take_one()?;
Ok(())
}
- Some(c) if REPLACEMENTS.iter().any(|&x| x.0 == c) => {
- // See GNU test-suite e11: In single quotes, \t remains as it is.
- // Comparing with GNU behavior: \a is not accepted and issues an error.
- // So apparently only known sequences are allowed, even though they are not expanded.... bug of GNU?
+ Some(_) => {
self.push_char_to_word(BACKSLASH);
- self.take_one()?;
Ok(())
}
- Some(c) => Err(self.make_invalid_sequence_backslash_xin_minus_s(c)),
}
}In the patched code, when the parser encounters a backslash followed by any character other than ' or \ (matched via Some(_)), it pushes the literal BACKSLASH character to the current word buffer without consuming the lookahead character via self.take_one()?. The lookahead character is subsequently processed as a normal literal character on the next iteration of the single-quote parser loop.
> [!NOTE]
> Fix Completeness Assessment: Leaving the subsequent character to be consumed by the standard single-quote iteration loop is cleaner and prevents lookahead state desynchronization. For example, if a backslash is followed by a single quote, the earlier branch handles \'. If a backslash is followed by any other character, pushing BACKSLASH and letting the main loop consume the next character ensures all characters—including consecutive backslashes or subsequent closing quotes—are tokenized accurately. The regression tests in tests/by-util/test_env.rs confirm that \a still properly fails with exit code 125 in unquoted and double-quoted contexts while succeeding inside single quotes.
Triggering CVE-2026-35377 requires no elevated privileges or complex race conditions. Any local invocation of the uutils env binary with the -S flag where a single-quoted segment contains a non-standard backslash sequence will reliably terminate the process.
A primary scenario involves executable scripts utilizing env -S in their shebang line to pass regular expressions, printf formatting strings, or byte escapes to an underlying utility. Consider a script designed to output or match hexadecimal escape patterns:
#!/usr/bin/env -S printf '%s\n' '\a\b\x'When executed on a system using GNU env, the argument splitter preserves '\a\b\x' literally, invokes /usr/bin/printf, and prints \a\b\x to standard output. On a system running a vulnerable version of uutils coreutils, executing the script immediately fails before the target binary is invoked:
env: invalid sequence '\a' in -SA second scenario occurs in automated continuous integration (CI/CD) pipelines, container entrypoints, or administrative wrapper scripts that pass regular expressions to tools like grep, sed, or awk via env -S. For example:
env -S "grep -P 'foo\x20bar' /var/log/syslog"Because 'foo\x20bar' uses single quotes to protect the Perl-compatible regular expression hex escape \x20 from shell expansion, env -S receives 'foo\x20bar' inside its split-string buffer. The vulnerable uutils parser rejects \x, exits with status 125 (EXIT_CANCELED), and causes the enclosing automation pipeline or administrative task to fail.
CVE-2026-35377 is assigned a CVSS v3.1 base score of 3.3 (Low) with the vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L. Because uutils coreutils is written in memory-safe Rust and the bug is strictly a logical validation error in a deterministic state machine, there is no memory corruption, out-of-bounds read, or arbitrary code execution risk. Confidentiality and integrity metrics are completely unaffected (C:N/I:N).
The operational impact is confined to local availability (A:L). In distributions or container images that adopt uutils coreutils as a drop-in replacement for GNU coreutils (such as Ubuntu installations experimenting with Rust coreutils transitions or specialized minimal Linux environments), compatibility divergences in core POSIX utilities can disrupt system boot scripts, package maintainer scripts, or monitoring jobs.
If an administrative service or cron job invokes env -S with dynamic or user-influenced single-quoted arguments (for example, passing a sanitized literal search query to a subcommand wrapped in single quotes), an unprivileged local user (PR:L) can supply a benign backslash character sequence like \x or \a to force env to abort with exit code 125. Threat intelligence metrics reflect this limited scope: the EPSS score is 0.00106 (1.13th percentile), and there are no reports of active exploitation in the wild.
Remediation requires updating uutils coreutils (uu_env) to a release incorporating commit 9d7a0e849109c82262ac2d65324739aac690200f (merged via Pull Request #11512 on March 18, 2026). Distribution maintainers and developers embedding uu_env as a Rust crate dependency should rebuild their binaries against the patched upstream revision.
To verify whether an installed env binary is vulnerable, administrators can execute the following one-line validation test from a POSIX shell:
env -S "printf '%s\n' '\x'"A patched or GNU-compliant env binary will output \x and return exit code 0. A vulnerable uutils binary will print env: invalid sequence '\x' in -S to standard error and return exit code 125.
If immediate binary patching is not feasible, administrators can apply workarounds at the script level:
-S arguments with double backslashes (\\). For example, changing '\x' to '\\x' allows the vulnerable parser to match the explicit \\ escape rule and output a single literal backslash.env -S in Shebangs: Where possible, refactor script shebang lines to invoke the target interpreter directly without -S, or wrap multi-argument execution inside a standard /bin/sh wrapper script.env: On systems where both GNU coreutils and uutils coreutils are present, explicitly point critical automation scripts to the GNU env binary path.CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
coreutils (uu_env) uutils | prior to commit 9d7a0e849109c82262ac2d65324739aac690200f | 9d7a0e849109c82262ac2d65324739aac690200f |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-35377 |
| Weakness Class | CWE-20 (Improper Input Validation) |
| Affected Component | uutils coreutils env (src/uu/env/src/split_iterator.rs) |
| Attack Vector | Local (AV:L) via env -S / --split-string argument parsing |
| CVSS v3.1 Score | 3.3 Low (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L) |
| EPSS Score | 0.11% (1.13th Percentile) |
| Security Impact | Local Denial of Service (Process termination with exit code 125) |
| CISA KEV Status | Not Listed |
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
A Time-of-Check to Time-of-Use (TOCTOU) race condition in the chcon utility of uutils coreutils prior to version 0.8.0 allows a local attacker with write access to a directory tree undergoing recursive SELinux context relabeling to redirect extended attribute modifications to arbitrary system files.
A line delimiter injection vulnerability in Git Large File Storage (Git LFS) versions 0.6.0 through 3.8.0 allows remote attackers to execute arbitrary commands via crafted Git submodule URLs containing embedded line feed characters.
CVE-2026-105803 (GHSA-x72p-hmqp-46hw) is a high-severity arbitrary command execution vulnerability in Git Large File Storage (Git LFS) affecting versions from v1.3.0 prior to v3.8.1. The flaw stems from the combination of an unanchored regular expression in custom transfer adapter initialization (CWE-777) and insufficient syntactic validation during .lfsconfig key filtering (CWE-1286). An attacker can craft a repository containing a malicious .lfsconfig file that bypasses safe-key filtering restrictions and registers an arbitrary binary as a custom transfer adapter, leading to remote code execution when a victim clones or fetches from the repository.
An unauthenticated SQL injection vulnerability exists in Daptin prior to version 0.12.30. The generic entity listing handler fails to validate user-supplied sort parameters against the table schema before passing them to the goqu SQL query builder, enabling remote attackers to break out of SQL identifier quoting and execute arbitrary SQL subqueries.
CVE-2026-77369 is a broken access control and Insecure Direct Object Reference (IDOR) vulnerability in Daptin, an open-source headless CMS. Affected versions from 0.11.4 through 0.12.29 expose a generic YJS real-time collaboration WebSocket endpoint (`GET /yjs/:documentName`) that verifies user authentication but fails to enforce row-level authorization when supplied with a canonical database room identifier (`{typename}.{referenceId}.{columnName}`). This allows any low-privileged authenticated user to read or modify restricted database columns of type `file.*` across all entities.
CVE-2026-77376 is an open redirect vulnerability (CWE-601) in the core framework of Bolt CMS prior to version 6.1.4. The vulnerability resides within the LoginFormAuthenticator class, which processes post-authentication redirection for both successful and failed login attempts. Due to a lack of destination validation, the application accepts untrusted target paths from user sessions and directly reflects unvalidated HTTP Referer headers into HTTP Location response headers. Attackers can exploit this behavior to redirect users to arbitrary external domains after interacting with the Bolt login endpoint, facilitating credential harvesting and phishing attacks.