Skip to content

GHSA-hwhf-8p2f-45wr

Duplicate Advisory: coreutils' comm utility silently corrupts data by performing lossy UTF-8 conversion on all output lines

Low Withdrawn Jul 6, 2026 crates.io
Severity
3.3 / 10
Low · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-176 Improper Handling of Unicode Encoding
Fix
0.6.0
Upgrade coreutils to this version or later

Description

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-6gcw-w7cp-94g9. This link is maintained to preserve external references.

Original Description

The comm utility in uutils coreutils silently corrupts data by performing lossy UTF-8 conversion on all output lines. The implementation uses String::from_utf8_lossy(), which replaces invalid UTF-8 byte sequences with the Unicode replacement character (U+FFFD). This behavior differs from GNU comm, which processes raw bytes and preserves the original input. This results in corrupted output when the utility is used to compare binary files or files using non-UTF-8 legacy encodings.

Affected versions

crates.io

PackageVulnerableFixed in
coreutils
< 0.6.0
0.6.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

coreutils crates.io → 0.6.0

cargo
cargo update -p coreutils --precise 0.6.0

Severity breakdown

CVSS 3.1 3.3

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

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Weakness

CWE-176: Improper Handling of Unicode Encoding

The product does not properly handle when an input contains Unicode encoding.

How to prevent it
  • Architecture and Design: Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • Implementation: Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

References

Timeline

  1. Published
  2. Withdrawn
  3. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-m2pg-c7m6-77pj
uutils coreutils has an Improper Input Validation Issue in its cut Utility
Medium Also affects coreutils
GHSA-fhr3-xh3q-69w6
uutils coreutils has an Incorrect Provision of Specified Functionality Issue
Low Also affects coreutils
GHSA-5pv5-xh52-hvrp
uutils coreutils has an Incorrect Short Circuit Evaluation Issue
Low Also affects coreutils
GHSA-5v4g-vw9x-h534
uutils coreutils has an Improper Input Validation Issue in its env Utility
Low Also affects coreutils
GHSA-6g8r-74qp-6859
uutils coreutils has a Time-of-check Time-of-use (TOCTOU) Race Condition
Medium Also affects coreutils
GHSA-vx9m-xjwf-8cqm
uutils coreutils has an Improper Handling of Unicode Encoding Issue
Low Also affects coreutils
GHSA-4wrp-79m8-9m9p
uutils coreutils has a Time-of-check Time-of-use (TOCTOU) Race Condition
Medium Also affects coreutils
GHSA-wq63-vh5h-pr5p
uutils coreutils has a UNIX Symbolic Link (Symlink) Following issue
Medium Also affects coreutils
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor