# GHSA-927q-g9w9-pm54: Panic in mp3-metadata due to the lack of bounds checking

> A lack of bounds checking in the mp3-metadata library allows attackers to cause a panic and denial of service by providing crafted MP3 data.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Apr 2025
- **Also known as:** RUSTSEC-2025-0027

## What is GHSA-927q-g9w9-pm54?

GHSA-927q-g9w9-pm54 is a denial of service vulnerability in mp3-metadata, published on 28 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The `get_id3()` methods used by `mp3_metadata::read_from_slice()` does not perform adequate bounds checking when recreating the tag due to the use of desynchronization.

Fixed in [Fix index error](https://github.com/GuillaumeGomez/mp3-metadata/pull/37), released as part of 0.4.0.

## Which versions are affected by GHSA-927q-g9w9-pm54?

3 open source packages ship an affected version, including mp3-metadata.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mp3-metadata` | crates.io | All versions | 0.4.0 |
| `mp3-metadata` | crates.io | All versions | 0.4.0 |
| `mp3-metadata` | crates.io | From 0.0.0-0 | 0.4.0 |

## How do I fix GHSA-927q-g9w9-pm54?

Upgrade mp3-metadata to 0.4.0 or later.

## Is GHSA-927q-g9w9-pm54 being exploited?

There is no known exploitation of GHSA-927q-g9w9-pm54 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-927q-g9w9-pm54 and fix it if it is affected.

What it is: GHSA-927q-g9w9-pm54 is a denial of service vulnerability in mp3-metadata, published on 28 Apr 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-927q-g9w9-pm54 in the wild and no public exploit code.

Affected packages and fixed versions:
- mp3-metadata (crates.io): affected all versions; fixed in 0.4.0
- mp3-metadata (crates.io): affected all versions; fixed in 0.4.0
- mp3-metadata (crates.io): affected from 0.0.0-0; fixed in 0.4.0

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-927q-g9w9-pm54/ (Markdown: https://insights.sbomify.com/GHSA-927q-g9w9-pm54/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-927q-g9w9-pm54

---
From sbomify Insights: https://insights.sbomify.com/GHSA-927q-g9w9-pm54/
Summaries are generated and may contain mistakes; the official description above is the record.
