# GHSA-gch5-hwqf-mxhp: Unsoundness in `intern` methods on `intaglio` symbol interners

> Unsoundness in intaglio symbol interners allows memory corruption via stacked borrows violations, potentially leading to code execution or crashes.

- **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:** 26 Jul 2023
- **Also known as:** RUSTSEC-2023-0048

## What is GHSA-gch5-hwqf-mxhp?

GHSA-gch5-hwqf-mxhp is a memory corruption vulnerability in intaglio, published on 26 Jul 2023. 

### Official description

Affected versions of this crate have a stacked borrows violation when creating
references to interned contents. All interner types are affected.

The flaw was corrected in version 1.9.0 by reordering move and borrowing
operations and storing interned contents by raw pointer instead of as a `Box`.

## Which versions are affected by GHSA-gch5-hwqf-mxhp?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `intaglio` | crates.io | All versions | 1.9.0 |
| `intaglio` | crates.io | All versions | 1.9.0 |
| `intaglio` | crates.io | From 0.0.0-0 | 1.9.0 |

## How do I fix GHSA-gch5-hwqf-mxhp?

Upgrade intaglio to 1.9.0 or later.

## Is GHSA-gch5-hwqf-mxhp being exploited?

There is no known exploitation of GHSA-gch5-hwqf-mxhp in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-gch5-hwqf-mxhp and fix it if it is affected.

What it is: GHSA-gch5-hwqf-mxhp is a memory corruption vulnerability in intaglio, published on 26 Jul 2023. 
Exploitation: There is no known exploitation of GHSA-gch5-hwqf-mxhp in the wild and no public exploit code.

Affected packages and fixed versions:
- intaglio (crates.io): affected all versions; fixed in 1.9.0
- intaglio (crates.io): affected all versions; fixed in 1.9.0
- intaglio (crates.io): affected from 0.0.0-0; fixed in 1.9.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-gch5-hwqf-mxhp/ (Markdown: https://insights.sbomify.com/GHSA-gch5-hwqf-mxhp/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-gch5-hwqf-mxhp

---
From sbomify Insights: https://insights.sbomify.com/GHSA-gch5-hwqf-mxhp/
Summaries are generated and may contain mistakes; the official description above is the record.
