# GHSA-gfxp-f68g-8x78: `libyml::string::yaml_string_extend` is unsound and unmaintained

> Unsound memory handling in libyml allows attackers to trigger undefined behavior, potentially leading to code execution or crashes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 11 Sep 2025
- **Also known as:** RUSTSEC-2025-0067

## What is GHSA-gfxp-f68g-8x78?

GHSA-gfxp-f68g-8x78 is a memory corruption vulnerability in libyml, published on 11 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In version 0.0.4, `libyml::string::yaml_string_extend` was revised resulting in undefined behaviour, which is unsound.

The GitHub project for `libyml` was archived after unsoundness issues were raised.

If you rely on this crate, it is highly recommended switching to a maintained alternative.

## Recommended alternatives

- [`libyaml-safer`](https://crates.io/crates/libyaml-safer) 
- [`unsafe-libyaml-norway`](https://crates.io/crates/unsafe-libyaml-norway) - Maintained fork of `unsafe-libyaml`

## Which versions are affected by GHSA-gfxp-f68g-8x78?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libyml` | crates.io | From 0.0.0-0 | None |
| `libyml` | crates.io | From 0.0.4 to 0.0.5 | None |
| `libyml` | crates.io | From 0.0.4 to 0.0.5 | None |

## How do I fix GHSA-gfxp-f68g-8x78?

No fix has been published for GHSA-gfxp-f68g-8x78 yet. Limit exposure of the affected software until one is available.

## Is GHSA-gfxp-f68g-8x78 being exploited?

There is no known exploitation of GHSA-gfxp-f68g-8x78 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-gfxp-f68g-8x78 and fix it if it is affected.

What it is: GHSA-gfxp-f68g-8x78 is a memory corruption vulnerability in libyml, published on 11 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-gfxp-f68g-8x78 in the wild and no public exploit code.

Affected packages and fixed versions:
- libyml (crates.io): affected from 0.0.0-0; no fix listed
- libyml (crates.io): affected from 0.0.4 up to 0.0.5; no fix listed
- libyml (crates.io): affected from 0.0.4 up to 0.0.5; no fix listed

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-gfxp-f68g-8x78/ (Markdown: https://insights.sbomify.com/GHSA-gfxp-f68g-8x78/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-gfxp-f68g-8x78

---
From sbomify Insights: https://insights.sbomify.com/GHSA-gfxp-f68g-8x78/
Summaries are generated and may contain mistakes; the official description above is the record.
