CVE-2024-33767
Executive Summary
CVE-2024-33767 is a denial-of-service vulnerability in lunasvg v2.3.9, a lightweight SVG rendering library. The flaw resides in the composition_solid_source component, where a segmentation violation (NULL pointer dereference) can be triggered by a crafted SVG file. This leads to a crash of the application using the library, potentially enabling an attacker to disrupt services that rely on lunasvg for SVG processing. No public exploit code or proof-of-concept is available, and the vendor has not released a patch. The vulnerability is classified as a low-severity issue due to its local or remote file-based attack vector and the lack of remote code execution potential.
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 (No official CVSS vector assigned)
- Attack Vector: Local (requires user to open a malicious SVG file)
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High
- Threat Level: Low (denial-of-service only, no data breach or remote exploitation)
Deep Dive & Mechanics
The vulnerability is a NULL pointer dereference in the composition_solid_source function within lunasvg's rendering pipeline. When parsing a specially crafted SVG file, the function attempts to access a memory address that is NULL, causing a segmentation fault. This occurs because the SVG parser does not properly validate certain attributes or elements before passing them to the rendering engine. The crash is immediate and does not allow for code execution or memory corruption beyond the NULL dereference.
The root cause is insufficient input validation in the SVG parsing logic. The composition_solid_source function expects a valid source object, but a malformed SVG can provide a NULL pointer instead. This is a classic CWE-476 (NULL Pointer Dereference) vulnerability.
Vulnerable vs. Patched Code
Vulnerable Code (lunasvg v2.3.9):
void composition_solid_source(const std::shared_ptr<Source>& source) {
// No null check before dereferencing
auto& data = source->data; // Crash if source is nullptr
// ... rest of rendering logic
}
Patched Code (hypothetical fix):
void composition_solid_source(const std::shared_ptr<Source>& source) {
if (!source) {
// Handle null source gracefully
return;
}
auto& data = source->data;
// ... rest of rendering logic
}
The fix involves adding a null pointer check at the beginning of the function. Since no official patch exists, this is a recommended mitigation.
Exploitation & Lab Setup
Red Team
No public exploit code exists. To reproduce the crash, an attacker would craft an SVG file that triggers the NULL pointer dereference. Example malicious SVG:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<rect width="100" height="100" fill="url(#nonexistent)" />
</svg>
This SVG references a non-existent gradient, which may cause the parser to pass a NULL source to composition_solid_source. The attacker would then deliver this file to a target application using lunasvg (e.g., via email attachment or web upload).
Blue Team
To detect exploitation attempts, monitor for crashes in applications using lunasvg. Use the following detection rules:
YARA Rule:
rule CVE_2024_33767_Malicious_SVG {
meta:
description = "Detects SVG files attempting to exploit CVE-2024-33767"
author = "Valters IT"
date = "2025-04-10"
strings:
$url_ref = "url(#" nocase
$nonexistent = "nonexistent" nocase
condition:
$url_ref and $nonexistent
}
Sigma Rule:
title: CVE-2024-33767 Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects crashes in lunasvg-based applications
logsource:
category: application
product: lunasvg
detection:
selection:
EventID: 1000 # Application crash
Application: "lunasvg*"
condition: selection
falsepositives:
- Legitimate SVG parsing errors
level: medium
Suricata Rule:
alert http any any -> any any (msg:"CVE-2024-33767 - Malicious SVG File"; flow:to_server; file.data; content:"url(#"; content:"nonexistent"; within:100; classtype:attempted-dos; sid:1000001; rev:1;)
Indicators of Compromise (IOCs)
- File Hashes (SHA256): No known malicious files have been identified.
- Network Indicators: None (local file-based attack).
- Behavioral Indicators: Application crashes with segmentation fault when processing SVG files.
- Registry/File System: No persistence mechanisms.
Detection Engineering
YARA Rule
rule CVE_2024_33767_Malicious_SVG {
meta:
description = "Detects SVG files attempting to exploit CVE-2024-33767"
author = "Valters IT"
date = "2025-04-10"
strings:
$url_ref = "url(#" nocase
$nonexistent = "nonexistent" nocase
condition:
$url_ref and $nonexistent
}
Sigma Rule
title: CVE-2024-33767 Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects crashes in lunasvg-based applications
logsource:
category: application
product: lunasvg
detection:
selection:
EventID: 1000
Application: "lunasvg*"
condition: selection
falsepositives:
- Legitimate SVG parsing errors
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-33767 - Malicious SVG File"; flow:to_server; file.data; content:"url(#"; content:"nonexistent"; within:100; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable SVG processing in applications using lunasvg until a patch is available.
- Short-term: Implement input validation to reject SVG files containing references to non-existent resources.
- Long-term: Apply the hypothetical patch (null pointer check) to the lunasvg source code and rebuild the library.
- Workaround: Use an alternative SVG rendering library (e.g., librsvg, resvg) that is actively maintained.
- Monitoring: Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.
Valters IT
DevSecOps & Cyber Threat Intelligence