# GHSA-g98v-hv3f-hcfr: atty potential unaligned read

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2021-07-04T12:00:00.000Z
- Modified: 2026-09-10T03:49:53.897Z
- Also known as: RUSTSEC-2021-0145

## Description

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"

(As written by GitHub Advisory Database.)

## Affected

- atty (crates.io): up to 0.2.14; from 0.0.0-0

## References

- <https://github.com/softprops/atty/issues/50> (report, web)
- <https://github.com/softprops/atty/pull/51> (web)
- <https://github.com/softprops/atty> (package)
- <https://rustsec.org/advisories/RUSTSEC-2021-0145.html> (advisory, web)
- <https://crates.io/crates/atty> (package)
- <https://github.com/softprops/atty/issues/57> (report)

## Sources

- GitHub Advisory Database: [GHSA-g98v-hv3f-hcfr](https://github.com/advisories/GHSA-g98v-hv3f-hcfr), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2021-0145](https://rustsec.org/advisories/RUSTSEC-2021-0145.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-g98v-hv3f-hcfr · Whole record: https://cve.day/GHSA-g98v-hv3f-hcfr.json · Rebuilt by cve.day 2026-11-25T22:56:43.085Z
