# CVE-2025-49112: Integer overflow in Valkey

> An integer underflow in Valkey's networking code can lead to a denial of service condition, requiring administrators to apply security patches.

- **Severity:** Low 3.1 (`CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Jun 2025
- **Updated:** 2 Jun 2025
- **Also known as:** AZL-62243, BELL-CVE-2025-49112, BIT-keydb-2025-49112, BIT-redis-2025-49112, BIT-valkey-2025-49112, DEBIAN-CVE-2025-49112, ECHO-b783-e6af-4b18, GHSA-xhp4-6g9v-4xvj, MINI-7572-3r96-5qwh, MINI-886r-24pv-pvc5, MINI-fr5v-vcfw-cxq2, MINI-hf4m-8m99-999f, MINI-qjr4-mqfp-w48x, MINI-r5q4-r7gc-9gx5, MINI-v3pg-2xjr-62vh, MINI-vmvm-gfwm-g8j3, MINI-xmpj-hc89-mrr5, UBUNTU-CVE-2025-49112

## What is CVE-2025-49112?

CVE-2025-49112 is a low-severity vulnerability in Valkey, published on 2 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

setDeferredReply in networking.c in Valkey through 8.1.1 has an integer underflow for prev->size - prev->used.

Weakness: CWE-191 (Integer Underflow (Wrap or Wraparound))

## Which versions are affected by CVE-2025-49112?

3 open source packages ship an affected version, including valkey, keydb and redis.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `valkey` | Bitnami | All versions | 8.1.4 |
| `keydb` | Bitnami | All versions | None |
| `redis` | Bitnami | All versions | None |

## How do I fix CVE-2025-49112?

Upgrade valkey to 8.1.4 or later.

## Is CVE-2025-49112 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-49112 and fix it if it is affected.

What it is: CVE-2025-49112 is a low-severity vulnerability in Valkey, published on 2 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-49112 in the wild and no public exploit code.

Affected packages and fixed versions:
- valkey (Bitnami): affected all versions; fixed in 8.1.4
- keydb (Bitnami): affected all versions; no fix listed
- redis (Bitnami): affected all versions; no fix listed

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

## Sources

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

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