CVE-2024-57628
Executive Summary
CVE-2024-57628 is a denial-of-service (DoS) vulnerability in MonetDB Server v11.49.1, specifically within the exp_values_set_supertype component. An attacker can craft malicious SQL statements that trigger an issue in this component, leading to a crash or resource exhaustion. The vulnerability has a CVSS score of 0.0 (unscored) and an EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public exploit code or patch is available. The vendor, MonetDB, has not released a fix.
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
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored)
- Vector: UNKNOWN
- Attack Vector (AV): UNKNOWN
- Attack Complexity (AC): UNKNOWN
- Privileges Required (PR): UNKNOWN
- User Interaction (UI): UNKNOWN
- Scope (S): UNKNOWN
- Confidentiality (C): UNKNOWN
- Integrity (I): UNKNOWN
- Availability (A): UNKNOWN
- EPSS Score: 0.0% (Low exploitation probability)
- Threat Level: Low (due to low EPSS and no public exploit)
Deep Dive & Mechanics
The vulnerability resides in the exp_values_set_supertype function within MonetDB Server v11.49.1. This function is responsible for determining the common supertype for a set of values during SQL expression evaluation. When an attacker submits a crafted SQL statement that forces the function into an unexpected state (e.g., type mismatch, infinite loop, or memory corruption), the server may crash or become unresponsive.
The exact mechanism is not publicly documented, but based on the CWE-20 (Improper Input Validation) classification, the issue likely involves insufficient validation of input types or values, leading to a denial-of-service condition. The attack vector is network-based, requiring only the ability to send SQL queries to the server.
Vulnerable vs. Patched Code
No patch is available. The vulnerable code is in the exp_values_set_supertype function of MonetDB Server v11.49.1. Without a patch, the exact code diff cannot be provided. However, a hypothetical fix would involve adding input validation and bounds checking to prevent the function from entering an infinite loop or crashing.
Vulnerable code (hypothetical):
// Vulnerable: No bounds check on input values
int exp_values_set_supertype(ValueSet *vs) {
while (vs->next) {
// Process values without validation
vs = vs->next;
}
return 0;
}
Patched code (hypothetical):
// Patched: Added bounds check and loop limit
int exp_values_set_supertype(ValueSet *vs) {
int count = 0;
while (vs->next && count < MAX_VALUES) {
// Validate value type
if (!is_valid_type(vs->type)) {
return -1;
}
vs = vs->next;
count++;
}
return 0;
}
Exploitation & Lab Setup
Red Team
- Setup: Deploy MonetDB Server v11.49.1 on a test network.
- Craft SQL: Create a SQL statement that triggers the vulnerability, e.g., a query with deeply nested type conversions or malformed value sets.
- Execute: Send the crafted SQL to the server.
- Observe: Monitor server crash or denial of service.
Example SQL (hypothetical):
-- Crafted to trigger exp_values_set_supertype issue
SELECT * FROM (VALUES (1, 'a'), (2, 'b'), (3, 'c')) AS t(a, b)
UNION ALL
SELECT * FROM (VALUES (1, 'x'), (2, 'y'), (3, 'z')) AS u(a, b)
-- Additional malformed values to cause DoS
Blue Team
- Monitor: Watch for unusual SQL queries with complex type conversions or large value sets.
- Rate Limit: Implement query rate limiting to reduce impact.
- WAF: Use a Web Application Firewall to block suspicious SQL patterns.
- Backup: Ensure regular backups and failover mechanisms.
Indicators of Compromise (IOCs)
- Network: SQL queries containing
VALUESwith mismatched types or excessive nesting. - Logs: Server logs showing repeated crashes or errors in
exp_values_set_supertype. - System: High CPU or memory usage on the MonetDB server during attack.
Detection Engineering
YARA Rule
rule CVE_2024_57628_MonetDB_DoS {
meta:
description = "Detects SQL queries targeting CVE-2024-57628 in MonetDB"
author = "Valters IT"
date = "2025-04-10"
strings:
$sql1 = "VALUES" ascii nocase
$sql2 = "UNION" ascii nocase
$sql3 = "exp_values_set_supertype" ascii nocase
condition:
all of ($sql*) and filesize < 10KB
}
Sigma Rule
title: MonetDB DoS via Crafted SQL
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL queries that may exploit CVE-2024-57628
author: Valters IT
logsource:
category: application
product: monetdb
detection:
selection:
EventID: 4625
Message|contains: 'exp_values_set_supertype'
condition: selection
falsepositives:
- Legitimate complex queries
level: medium
Suricata Rule
alert tcp any any -> any 50000 (msg:"CVE-2024-57628 MonetDB DoS Attempt"; flow:to_server; content:"VALUES"; nocase; content:"UNION"; nocase; distance:0; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
- Patch: No patch available. Monitor MonetDB for updates.
- Workaround: Restrict SQL query complexity via database configuration.
- Network: Limit access to MonetDB server to trusted IPs only.
- Monitoring: Enable detailed logging and alert on suspicious queries.
- Backup: Maintain offline backups for recovery.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.