☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-49112

CVE-2025-49112 Integer Underflow in Valkey
📅 PUBLISHED: 2025-06-02 00:00 UTC 🔄 UPDATED: 2026-09-23 20:36 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.25%
👁️
0.25% probability
6.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
3.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-49112 is a low-severity vulnerability in the Valkey in-memory data store, affecting versions through 8.1.1. The flaw resides in the setDeferredReply function within networking.c, where an integer underflow can occur when calculating prev->size - prev->used. This condition can lead to a denial of service (DoS) by causing unexpected behavior or crashes in the server process. The vulnerability has a CVSS score of 3.1, indicating low impact, but it is currently unpatched, making it a potential risk for systems running affected versions. No public proof-of-concept (PoC) or exploit code is available at this time.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 3.1 (Low)
  • Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: High (AC:H) – Exploitation requires specific conditions or knowledge of the server state.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The impact is confined to the vulnerable component.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: Low (A:L) – Potential for service degradation or crash.

Threat Level: Low. The high attack complexity and low availability impact reduce the immediate risk, but the lack of a patch means that systems running Valkey 8.1.1 or earlier are exposed to potential DoS attacks.

Deep Dive & Mechanics

The vulnerability is located in the setDeferredReply function in networking.c. This function is responsible for managing deferred replies in Valkey’s networking layer. The issue arises from an integer underflow in the expression prev->size - prev->used. If prev->used is greater than prev->size, the subtraction results in a negative value, which is interpreted as a large unsigned integer due to C’s integer promotion rules. This can lead to incorrect memory allocation or buffer handling, potentially causing a crash or denial of service.

The root cause is a lack of validation before performing the subtraction. An attacker could craft specific network requests that manipulate the prev->used field to exceed prev->size, triggering the underflow. This is a classic CWE-191 (Integer Underflow) vulnerability.

Vulnerable vs. Patched Code

Vulnerable Code (Valkey <= 8.1.1):

// In setDeferredReply function
size_t remaining = prev->size - prev->used;
// No check for underflow

Patched Code (Hypothetical):

// In setDeferredReply function
if (prev->used > prev->size) {
    // Handle error or reset
    prev->used = prev->size;
}
size_t remaining = prev->size - prev->used;

The patch would add a bounds check to ensure prev->used does not exceed prev->size before performing the subtraction, preventing the underflow.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Lab Setup:

  1. Install Valkey 8.1.1 on a test server (e.g., Ubuntu 22.04).
  2. Configure Valkey to listen on a network interface.
  3. Use a custom Python script to send malformed requests.

Exploit Attempt:

import socket

def trigger_underflow(target_ip, target_port=6379):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect((target_ip, target_port))
    # Craft a request that manipulates deferred reply state
    # This is a placeholder; actual exploit requires deep protocol knowledge
    payload = b"*3\r\n$3\r\nSET\r\n$1\r\nx\r\n$1\r\ny\r\n"
    sock.send(payload)
    response = sock.recv(1024)
    print(response)
    sock.close()

if __name__ == "__main__":
    trigger_underflow("192.168.1.100")

Note: No public exploit exists; this is a conceptual demonstration.

Blue Team (Defense & Detection)

Detection:

  • Monitor Valkey logs for crashes or unexpected behavior.
  • Use network monitoring to detect anomalous requests.

Mitigation:

  • Restrict network access to Valkey servers.
  • Apply rate limiting to reduce attack surface.
  • Monitor for integer underflow patterns in logs.

Indicators of Compromise (IOCs)

  • Network: Unusual Valkey requests with large or malformed payloads.
  • Logs: Valkey crash logs containing references to setDeferredReply or integer underflow.
  • System: Unexpected Valkey process termination or high CPU usage.

Detection Engineering

YARA Rule

rule CVE_2025_49112_Valkey_Underflow {
    meta:
        description = "Detects Valkey binary with integer underflow vulnerability in setDeferredReply"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-49112"
    strings:
        $code1 = "prev->size - prev->used" ascii wide
        $code2 = "setDeferredReply" ascii wide
    condition:
        $code1 and $code2
}

Sigma Rule

title: CVE-2025-49112 Valkey Integer Underflow
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of Valkey integer underflow vulnerability
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: valkey
detection:
    selection:
        EventID: 1000  # Example crash event
        Message: "*setDeferredReply*"
    condition: selection
falsepositives:
    - Legitimate Valkey crashes due to other reasons
level: low

Suricata Rule

alert tcp any any -> any 6379 (msg:"CVE-2025-49112 Valkey Integer Underflow Attempt"; flow:to_server; content:"*3|0d 0a|"; depth:4; content:"SET"; distance:0; within:10; reference:cve,2025-49112; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  • Monitor Valkey servers for crashes and apply workarounds if possible.
  • Restrict network access to trusted hosts only.

Long-term Fix:

  • Apply a patch when available from the Valkey project.
  • Upgrade to a patched version once released.

Workarounds:

  • Disable deferred replies if not needed (configuration change).
  • Use a web application firewall (WAF) to filter malicious requests.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-49112/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.