GHSA-g98v-hv3f-hcfr: Atty Atty Potential Unaligned Read Vulnerability

LOW
Published
Advisory Summary

GHSA-g98v-hv3f-hcfr is a LOW atty potential unaligned read vulnerability (General Security Weakness) affecting Atty libraries in the crates.io ecosystem. The issue involves atty potential unaligned read. Remediation is available in the latest vendor maintenance releases.

GHSA-g98v-hv3f-hcfr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-g98v-hv3f-hcfr
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Atty
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-g98v-hv3f-hcfr

To remediate this vulnerability, upgrade all affected Atty dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

atty fixed: Latest secure release
Upgrade atty to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for atty

How to Check if You Are Affected

To determine whether your application is affected by GHSA-g98v-hv3f-hcfr, inspect your project dependencies for Atty:

inspect dependencies for atty

Analyze the terminal output to locate any version of Atty in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Atty, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

On windows, `atty` dereferences a potentially unaligned pointer. In practice however, the pointer won't be unaligned unless a custom global allocator is used. In particular, the `System` allocator on windows uses `HeapAlloc`, which guarantees a large enough alignment. # atty is Unmaintained A Pull Request with a fix has been provided over a year ago but the maintainer seems to be unreachable. Last release of `atty` was almost 3 years ago. ## Possible Alternative(s) The below list has not been vetted in any way and may or may not contain alternatives; - [std::io::IsTerminal](https://doc.rust-lang.org/stable/std/io/trait.IsTerminal.html) - Stable since Rust 1.70.0 - [is-terminal](https://crates.io/crates/is-terminal) - Standalone crate supporting Rust older than 1.70.0"

GHSA-g98v-hv3f-hcfr Affected Atty Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
atty
crates.io
≤ 0.2.14

References

Frequently Asked Questions

What is GHSA-g98v-hv3f-hcfr?
GHSA-g98v-hv3f-hcfr is a security vulnerability in Atty involving atty potential unaligned read under General Security Weakness.
Which Atty versions are affected?
Affected versions include releases prior to current release patches across affected packages: atty.
What version fixes GHSA-g98v-hv3f-hcfr?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is atty affected?
Yes, atty is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-g98v-hv3f-hcfr?
GHSA-g98v-hv3f-hcfr is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-g98v-hv3f-hcfr?
Run the dependency tree command: 'inspect dependencies for atty'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g98v-hv3f-hcfr",
  "modified" : "2024-02-14T17:42:44Z",
  "published" : "2023-06-30T20:21:59Z",
  "aliases" : [ ],
  "summary" : "atty potential unaligned read",
  "details" : "On windows, `atty` dereferences a potentially unaligned pointer.\n\nIn practice however, the pointer won't be unaligned unless a custom global allocator is used.\n\nIn particular, the `System` allocator on windows uses `HeapAlloc`, which guarantees a large enough alignment.\n\n# atty is Unmaintained\n\nA Pull Request with a fix has been provided over a year ago but the maintainer seems to be unreachable.\n\nLast release of `atty` was almost 3 years ago.\n\n## Possible Alternative(s)\n\nThe below list has not been vetted in any way and may or may not contain alternatives;\n\n- [std::io::IsTerminal](https://doc.rust-lang.org/stable/std/io/trait.IsTerminal.html) - Stable since Rust 1.70.0\n- [is-terminal](https://crates.io/crates/is-terminal) - Standalone crate supporting Rust older than 1.70.0\"\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "atty"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.2.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/softprops/atty/issues/50"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/softprops/atty/pull/51"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/softprops/atty"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2021-0145.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-30T20:21:59Z",
    "nvd_published_at" : null
  }
}