# CVE-2020-28975: scikit-learn Denial of Service

> Attackers can cause a segmentation fault and denial of service in Libsvm by providing a crafted model with large support values.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Nov 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-jxfp-4rvq-9h9m, PYSEC-2020-108, openSUSE-SU-2024:11805-1, openSUSE-SU-2025:14729-1

## What is CVE-2020-28975?

CVE-2020-28975 is a high-severity denial of service vulnerability in n/a, published on 21 Nov 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

svm_predict_values in svm.cpp in Libsvm v324, as used in scikit-learn 0.23.2 and other products, allows attackers to cause a denial of service (segmentation fault) via a crafted model SVM (introduced via pickle, json, or any other model permanence standard) with a large value in the _n_support array. NOTE: the scikit-learn vendor's position is that the behavior can only occur if the library's API is violated by an application that changes a private attribute.

## Which versions are affected by CVE-2020-28975?

3 open source packages ship an affected version, including scikit-learn. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `scikit-learn` | PyPI | All versions | 0.24.dev0 |
| `scikit-learn` | PyPI | From 0.23.2 | 1.0.1 |
| `scikit-learn` | PyPI | From 0.23.2 | 1.0.1 |
| `python-scikit-learn` | openSUSE:Tumbleweed | All versions | 1.6.1-1.1 |

Products: Scikit-Learn Scikit-Learn.

## How do I fix CVE-2020-28975?

Upgrade scikit-learn to a fixed version for your release line: 0.24.dev0 or 1.0.1.

## Is CVE-2020-28975 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2020-13092](https://insights.sbomify.com/CVE-2020-13092/): scikit-learn Deserialization of Untrusted Data (critical 9.8)
- [CVE-2024-5206](https://insights.sbomify.com/CVE-2024-5206/): Sensitive Data Leakage in sklearn.feature_extraction.text.TfidfVectorizer in scikit-learn/scikit-learn (medium 4.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-28975 and fix it if it is affected.

What it is: CVE-2020-28975 is a high-severity denial of service vulnerability in n/a, published on 21 Nov 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-28975 exists.

Affected packages and fixed versions:
- scikit-learn (PyPI): affected all versions; fixed in 0.24.dev0
- scikit-learn (PyPI): affected from 0.23.2; fixed in 1.0.1
- scikit-learn (PyPI): affected from 0.23.2; fixed in 1.0.1

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-2020-28975/ (Markdown: https://insights.sbomify.com/CVE-2020-28975/index.md)
```

## Sources

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

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