Description
A Regular Expression Denial of Service (ReDOS) vulnerability was discovered in Mpmath v1.0.0 through v1.2.1 when the mpmathify function is called.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mpmath | 1.2.1-2 | — |
| Debian 13 | mpmath | 1.2.1-2 | — |
| Debian 12 | mpmath | 1.2.1-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | mpmath | 1.1.0-2ubuntu0.1~esm1 | USN-7160-1 |
| Ubuntu Pro 18.04 LTS | mpmath | 1.0.0-1ubuntu0.1~esm1 | USN-7160-1 |
| Ubuntu Pro 16.04 LTS | mpmath | 0.19-3ubuntu0.1~esm1 | USN-7160-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-mpmath | 1.3.0-3.4 | openSUSE-SU-2026:12018-1 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | py3.10-mpmath +3 | 1.4.0-r1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | mpmath | < 1.3.0 | 1.3.0 | GHSA-f865-m6cq-j9vx |
Advisories 2
- openSUSE-SU-2026:12018-1 python313-mpmath-1.3.0-3.4 on GA media SUSE / openSUSE Security Updates · Oct 5, 2026
- USN-7160-1 mpmath vulnerability Ubuntu Security Notices (USN) · Jun 25, 2026
References
- https://github.com/yetingli/SaveResults/blob/main/js/hosted-git-info.js
- https://github.com/npm/hosted-git-info/pull/76
- https://www.npmjs.com/package/hosted-git-info
- https://github.com/yetingli/PoCs/blob/main/CVE-2021-29063/Mpmath.md
- FEDORA-2021-fc30c0de34 vendor-advisory
- FEDORA-2021-244a18163c vendor-advisory
- FEDORA-2021-bc2153d8f0 vendor-advisory
- https://github.com/fredrik-johansson/mpmath/commit/46d44c3c8f3244017fe1eb102d564eb4ab8ef750
- https://github.com/mpmath/mpmath/releases/tag/1.3.0