# CVE-2024-12224: idna accepts Punycode labels that do not produce any non-ASCII when decoded

> Attackers can create Punycode hostnames that bypass security checks by exploiting inconsistent IDNA decoding in the Rust idna crate.

- **Severity:** Medium 5.1 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 May 2025
- **Updated:** 30 May 2025
- **Also known as:** DEBIAN-CVE-2024-12224, GHSA-h97m-ww89-6jmq, MINI-4f9h-74xv-8mmp, OESA-2026-3013, RUSTSEC-2024-0421, SUSE-RU-2025:02203-1, SUSE-RU-2025:02204-1, SUSE-SU-2025:02586-1, SUSE-SU-2025:02587-1, SUSE-SU-2025:02768-1, SUSE-SU-2025:20491-1, SUSE-SU-2026:0243-1, UBUNTU-CVE-2024-12224, openSUSE-SU-2025:15201-1, openSUSE-SU-2025:15202-1, openSUSE-SU-2025:15353-1, openSUSE-SU-2025:15588-1, openSUSE-SU-2025:15656-1

## What is CVE-2024-12224?

CVE-2024-12224 is a medium-severity vulnerability in servo rust-url, published on 30 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Improper Validation of Unsafe Equivalence in punycode by the idna crate from Servo rust-url allows an attacker to create a punycode hostname that one part of a system might treat as distinct while another part of that system would treat as equivalent to another hostname.

Weakness: CWE-352 (Cross-Site Request Forgery), CWE-1289 (Improper Validation of Unsafe Equivalence in Input)

## Which versions are affected by CVE-2024-12224?

3 open source packages ship an affected version, including idna. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `idna` | crates.io | All versions | 1.0.0 |
| `idna` | crates.io | All versions | 1.0.0 |
| `idna` | crates.io | From 0.0.0-0 | 1.0.0 |
| `rav1e` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 0.6.6-150600.3.3.1 |
| `librsvg` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.57.4-150600.3.3.1 |
| `rav1e` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 0.6.6-150600.3.3.1 |
| `librsvg` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP7 | All versions | 2.57.4-150600.3.3.1 |
| `sccache` | SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 0.4.2~4-150600.10.3.1 |
| `sccache` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 0.4.2~4-150600.10.3.1 |
| `aws-nitro-enclaves-cli` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 1.4.2~git0.6e8512e-150400.3.9.1 |
| `aws-nitro-enclaves-cli` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 1.4.2~git0.6e8512e-150400.3.9.1 |
| `aws-nitro-enclaves-cli` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 1.4.2~git0.6e8512e-150600.10.6.1 |
| `aws-nitro-enclaves-cli` | SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | All versions | 1.4.2~git0.6e8512e-150600.10.6.1 |
| `rust-keylime` | SUSE:Linux Micro 6.0 | All versions | 0.2.7+70-1.1 |
| `aws-nitro-enclaves-cli` | openSUSE:Leap 15.6 | All versions | 1.4.2~git0.6e8512e-150600.10.6.1 |
| `librsvg` | openSUSE:Leap 15.6 | All versions | 2.57.4-150600.3.3.1 |
| `rav1e` | openSUSE:Leap 15.6 | All versions | 0.6.6-150600.3.3.1 |
| `sccache` | openSUSE:Leap 15.6 | All versions | 0.4.2~4-150600.10.3.1 |
| `afterburn` | openSUSE:Tumbleweed | All versions | 5.9.0.git21.a73f509-2.1 |
| `python-nh3` | openSUSE:Tumbleweed | All versions | 0.2.17-2.1 |
| `python-selenium` | openSUSE:Tumbleweed | All versions | 4.25.0-5.1 |
| `rustup` | openSUSE:Tumbleweed | All versions | 1.28.2~0-1.1 |
| `sccache` | openSUSE:Tumbleweed | All versions | 0.12.0~1-1.1 |

Products: Servo Idna.

## How do I fix CVE-2024-12224?

Upgrade idna to 1.0.0 or later.

## Is CVE-2024-12224 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-12224 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-12224 and fix it if it is affected.

What it is: CVE-2024-12224 is a medium-severity vulnerability in servo rust-url, published on 30 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-12224 exists.

Affected packages and fixed versions:
- idna (crates.io): affected all versions; fixed in 1.0.0
- idna (crates.io): affected all versions; fixed in 1.0.0
- idna (crates.io): affected from 0.0.0-0; fixed in 1.0.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/CVE-2024-12224/ (Markdown: https://insights.sbomify.com/CVE-2024-12224/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-12224
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-12224
- OSV: https://osv.dev/vulnerability/CVE-2024-12224

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-12224/
Summaries are generated and may contain mistakes; the official description above is the record.
