VYPR
Low severity3.3NVD Advisory· Published Apr 22, 2026· Updated Apr 24, 2026

CVE-2026-35381

CVE-2026-35381

Description

A logic error in the cut utility of uutils coreutils causes the utility to ignore the -s (only-delimited) flag when using the -z (null-terminated) and -d '' (empty delimiter) options together. The implementation incorrectly routes this specific combination through a specialized newline-delimiter code path that fails to check the record suppression status. Consequently, uutils cut emits the entire record plus a NUL byte instead of suppressing it. This divergence from GNU coreutils behavior creates a data integrity risk for automated pipelines that rely on cut -s to filter out undelimited data.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
coreutilscrates.io
< 0.8.00.8.0

Affected products

1

Patches

1
483f13e91830

cut: improve function signature

https://github.com/uutils/coreutilsCan BölükMar 20, 2026via ghsa
2 files changed · +17 2
  • src/uu/cut/src/cut.rs+2 2 modified
    @@ -260,9 +260,9 @@ fn cut_fields_newline_char_delim<R: Read, W: Write>(
         reader: R,
         out: &mut W,
         ranges: &[Range],
    -    only_delimited: bool,
         newline_char: u8,
         out_delim: &[u8],
    +    only_delimited: bool,
     ) -> UResult<()> {
         let mut reader = BufReader::new(reader);
         let mut line = Vec::new();
    @@ -398,9 +398,9 @@ fn cut_fields<R: Read, W: Write>(
                     reader,
                     out,
                     ranges,
    -                field_opts.only_delimited,
                     newline_char,
                     out_delim,
    +                field_opts.only_delimited,
                 )
             }
             Delimiter::Slice(delim) => {
    
  • tests/by-util/test_cut.rs+15 0 modified
    @@ -229,6 +229,21 @@ fn test_zero_terminated_only_delimited() {
             .stdout_only("82\n7\0");
     }
     
    +#[test]
    +fn test_suppresses_unterminated_segment() {
    +    new_ucmd!()
    +        .args(&["-z", "-d", "", "-s", "-f", "1"])
    +        .pipe_in("unterminated")
    +        .succeeds()
    +        .stdout_only_bytes("");
    +
    +    new_ucmd!()
    +        .args(&["-z", "-d", "", "-s", "-f", "1"])
    +        .pipe_in("terminated\0unterminated")
    +        .succeeds()
    +        .stdout_only_bytes("terminated\0");
    +}
    +
     #[test]
     fn test_is_a_directory() {
         let (at, mut ucmd) = at_and_ucmd!();
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

1