# GHSA-58xc-hpvq-8473: Safe API can cause heap-buffer-overflow

> A heap buffer overflow in the Redox UEFI Safe API allows attackers to cause crashes or execute arbitrary code via unsafe pointer handling.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2025
- **Also known as:** RUSTSEC-2025-0032

## What is GHSA-58xc-hpvq-8473?

GHSA-58xc-hpvq-8473 is a memory corruption vulnerability in redox_uefi_std, published on 27 Mar 2025. 

### Official description

ffi::nstr() should be marked unsafe, since a pointer to a buffer without a trailing 0 value will cause a heap buffer overflow.

## Which versions are affected by GHSA-58xc-hpvq-8473?

3 open source packages ship an affected version, including redox_uefi_std.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `redox_uefi_std` | crates.io | From 0.1.8 | 0.1.14 |
| `redox_uefi_std` | crates.io | From 0.1.8 | 0.1.14 |
| `redox_uefi_std` | crates.io | From 0.1.8 | 0.1.14 |

## How do I fix GHSA-58xc-hpvq-8473?

Upgrade redox_uefi_std to 0.1.14 or later.

## Is GHSA-58xc-hpvq-8473 being exploited?

There is no known exploitation of GHSA-58xc-hpvq-8473 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-58xc-hpvq-8473 and fix it if it is affected.

What it is: GHSA-58xc-hpvq-8473 is a memory corruption vulnerability in redox_uefi_std, published on 27 Mar 2025. 
Exploitation: There is no known exploitation of GHSA-58xc-hpvq-8473 in the wild and no public exploit code.

Affected packages and fixed versions:
- redox_uefi_std (crates.io): affected from 0.1.8; fixed in 0.1.14
- redox_uefi_std (crates.io): affected from 0.1.8; fixed in 0.1.14
- redox_uefi_std (crates.io): affected from 0.1.8; fixed in 0.1.14

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-58xc-hpvq-8473/ (Markdown: https://insights.sbomify.com/GHSA-58xc-hpvq-8473/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-58xc-hpvq-8473

---
From sbomify Insights: https://insights.sbomify.com/GHSA-58xc-hpvq-8473/
Summaries are generated and may contain mistakes; the official description above is the record.
