CVE-2026-9149
Executive Summary
CVE-2026-9149 is a heap buffer overflow vulnerability in the libsolv library, specifically in the repo_add_solv function. The flaw is triggered when a victim processes a specially crafted .solv file containing negative size values. This leads to an undersized memory allocation and a subsequent out-of-bounds write, which can be exploited to cause a denial of service (DoS). The vulnerability has a CVSS score of 6.5 (Medium severity) and currently has no known public exploit or patch. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for systems that process untrusted .solv files.
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.
No signup required
Supply Chain & Package Security
Libsolv is a dependency management library used in package managers like RPM (dnf, zypper) and other software distribution systems. This vulnerability could be exploited via malicious package repositories or crafted .solv files distributed through supply chain attacks. Organizations using libsolv-based tools should monitor for updates and restrict processing of untrusted .solv files.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Attack Vector (AV): Local (L) – requires local access to the system.
- Attack Complexity (AC): Low (L) – no special conditions needed.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): Required (R) – victim must process a malicious
.solvfile. - Scope (S): Unchanged (U) – vulnerability does not affect other components.
- Confidentiality (C): None (N) – no data exposure.
- Integrity (I): None (N) – no data modification.
- Availability (A): High (H) – can cause denial of service.
Threat Level: Medium. The vulnerability requires user interaction and local access, but it can lead to a complete denial of service for applications using libsolv.
Deep Dive & Mechanics
The vulnerability resides in the repo_add_solv function within libsolv. When parsing a .solv file, the function reads size values from the file to allocate memory for data structures. If a negative size value is provided, the allocation calculation results in an undersized buffer (due to integer truncation or wrapping). Subsequent writes to this buffer cause a heap-based buffer overflow, corrupting adjacent memory and potentially crashing the application.
Root Cause: Lack of validation for negative size values in the .solv file parser. The code likely uses a signed integer for size, and when a negative value is passed to malloc or similar, it may be interpreted as a large unsigned value, leading to allocation failure or undersized allocation.
Attack Vector: An attacker crafts a .solv file with negative size fields. When a victim (e.g., a system administrator or automated tool) processes this file using libsolv, the overflow occurs, causing a denial of service.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
int repo_add_solv(Repo *repo, const char *filename) {
// Read size from file
int size;
fread(&size, sizeof(int), 1, file);
// Allocate buffer based on size
char *buffer = malloc(size); // No validation for negative size
// Write data to buffer
fread(buffer, 1, size, file); // Out-of-bounds write if size is negative
}
Patched Code (Conceptual):
int repo_add_solv(Repo *repo, const char *filename) {
// Read size from file
int size;
fread(&size, sizeof(int), 1, file);
// Validate size
if (size <= 0) {
// Handle error
return -1;
}
// Allocate buffer
char *buffer = malloc(size);
// Write data to buffer
fread(buffer, 1, size, file);
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites: Access to a system using libsolv (e.g., Fedora, openSUSE). Ability to deliver a malicious .solv file to the victim.
Steps:
- Craft a
.solvfile with a negative size value in the header. - Deliver the file via email, download, or network share.
- Victim processes the file using a libsolv-based tool (e.g.,
dnf,zypper). - The heap overflow causes a crash, resulting in denial of service.
Example Crafting (Python):
import struct
# Create a malicious .solv file with negative size
with open('malicious.solv', 'wb') as f:
# Write negative size (-1)
f.write(struct.pack('<i', -1))
# Write some data (will cause overflow)
f.write(b'A' * 100)
Blue Team (Defense)
Detection:
- Monitor for crashes in libsolv-based processes.
- Use memory corruption detection tools (e.g., AddressSanitizer).
- Validate
.solvfiles before processing.
Mitigation:
- Restrict processing of
.solvfiles from untrusted sources. - Apply input validation (check for negative sizes) if source code is accessible.
- Use sandboxing or containerization for tools that process
.solvfiles.
Indicators of Compromise (IOCs)
- File Hashes: (None available; example only)
malicious.solv: SHA256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Process Behavior: Crash of
dnf,zypper, or other libsolv-based tools. - Network Traffic: Delivery of
.solvfiles via HTTP, email, or SMB. - Log Entries: Application crash logs with heap corruption errors.
Detection Engineering
YARA Rule
rule CVE_2026_9149_Libsolv_HeapOverflow {
meta:
description = "Detects malicious .solv files with negative size values"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-9149"
strings:
$magic = { 53 4F 4C 56 } // "SOLV" magic bytes
$negative_size = { FF FF FF FF } // -1 in little-endian
condition:
$magic at 0 and $negative_size at 4
}
Sigma Rule
title: CVE-2026-9149 Libsolv Heap Overflow Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects crashes or errors related to libsolv heap overflow
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: linux
detection:
selection:
EventID: 1000 (Application Error)
Image|endswith:
- '\dnf.exe'
- '\zypper.exe'
- '\libsolv.so'
condition: selection
falsepositives:
- Legitimate crashes due to other bugs
level: medium
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-9149 Libsolv Malicious .solv File Transfer"; flow:to_server; content:"|53 4F 4C 56|"; offset:0; depth:4; content:"|FF FF FF FF|"; offset:4; depth:4; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Do not process untrusted
.solvfiles until a patch is available. - Monitor vendor channels (e.g., libsolv GitHub, Red Hat, SUSE) for updates.
- Apply input validation if you have access to the source code (check for negative sizes).
Long-term Fix:
- Wait for an official patch from the libsolv maintainers.
- Update to a patched version once released.
Workarounds:
- Use a firewall or proxy to block
.solvfile downloads. - Implement file scanning for negative size values before processing.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert