# CVE-2018-1000810: Integer overflow in n/a

> An integer overflow in the Rust standard library's str::repeat function can lead to a buffer overflow, potentially allowing code execution or denial of service.

- **Severity:** Critical 9.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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:** 8 Oct 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-1000810, GHSA-2cg9-g249-7mf2, MGASA-2018-0407

## What is CVE-2018-1000810?

CVE-2018-1000810 is a critical vulnerability in n/a, published on 8 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Rust Programming Language Standard Library version 1.29.0, 1.28.0, 1.27.2, 1.27.1, 127.0, 126.2, 126.1, 126.0 contains a CWE-680: Integer Overflow to Buffer Overflow vulnerability in standard library that can result in buffer overflow. This attack appear to be exploitable via str::repeat, passed a large number, can overflow an internal buffer. This vulnerability appears to have been fixed in 1.29.1.

Weakness: CWE-190 (Integer Overflow or Wraparound)

## Which versions are affected by CVE-2018-1000810?

It affects 1 product.


Products: Rust-Lang Rust.

## How do I fix CVE-2018-1000810?

Upgrade to a fixed version.

## Is CVE-2018-1000810 being exploited?

There is no known exploitation of CVE-2018-1000810 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2020-36318](https://insights.sbomify.com/CVE-2020-36318/): Use after free in n/a (critical 9.8)
- [CVE-2021-29922](https://insights.sbomify.com/CVE-2021-29922/): Security feature bypass in n/a (critical 9.1)
- [CVE-2024-43402](https://insights.sbomify.com/CVE-2024-43402/): Rust OS Command Injection/Argument Injection vulnerability (high 8.2)
- [CVE-2018-1000657](https://insights.sbomify.com/CVE-2018-1000657/): Memory corruption in n/a (high 7.8)
- [CVE-2018-1000622](https://insights.sbomify.com/CVE-2018-1000622/): Other in n/a (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-1000810 and fix it if it is affected.

What it is: CVE-2018-1000810 is a critical vulnerability in n/a, published on 8 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-1000810 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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