CVE-2023-49556
Executive Summary
CVE-2023-49556 is a buffer overflow vulnerability discovered in YASM (Yet Another Assembler) version 1.3.0.86.g9def. The flaw resides in the expr_delete_term function within the libyasm/expr.c component, allowing a remote attacker to trigger a denial of service (DoS) by providing a specially crafted input. 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 proof-of-concept (PoC) code or patch exists, and the vendor has not acknowledged or addressed the issue.
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
YASM is a widely used assembler in development toolchains, often integrated into build systems and CI/CD pipelines. This vulnerability does not directly affect package registries (NPM, PyPI, Go, Ruby) but poses a risk to systems that process untrusted assembly files. Supply chain attacks could leverage malicious .asm files to crash build processes or disrupt development environments.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: None (I:N)
- Availability Impact: High (A:H)
- EPSS Score: 0.0% (Low exploitation probability)
Threat Level: Low (due to no active exploitation or PoC, but high availability impact if triggered).
Deep Dive & Mechanics
The vulnerability is a classic buffer overflow in the expr_delete_term function of YASM's expression parser. When processing malformed assembly expressions, the function fails to properly validate input lengths before copying data into a fixed-size buffer. This leads to memory corruption, typically resulting in a segmentation fault (DoS). The root cause is a missing bounds check on the term structure during deletion operations.
Technical Details:
- Affected Component:
libyasm/expr.c(functionexpr_delete_term) - Trigger: A crafted assembly file with an overly long or malformed expression term.
- Impact: Denial of service (crash of the assembler process). No code execution has been demonstrated.
Vulnerable vs. Patched Code
Vulnerable Code (YASM 1.3.0.86.g9def):
// libyasm/expr.c - expr_delete_term (simplified)
void expr_delete_term(expr_term *term) {
char buffer[256];
// No bounds check on term->data length
strcpy(buffer, term->data); // Potential overflow
// ... further processing
}
Patched Code (Hypothetical Fix):
// libyasm/expr.c - expr_delete_term (patched)
void expr_delete_term(expr_term *term) {
char buffer[256];
if (strlen(term->data) >= sizeof(buffer)) {
// Handle error or truncate
return;
}
strcpy(buffer, term->data);
// ... further processing
}
No official patch exists; the above is a recommended fix.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- YASM 1.3.0.86.g9def installed on a Linux/Unix system.
- Ability to supply a malicious
.asmfile.
Exploit Steps:
- Create a malicious assembly file with an overly long expression term:
; exploit.asm section .data db 'A' * 1000 ; Trigger overflow in expr_delete_term - Run YASM on the file:
yasm -f elf64 exploit.asm - Observe crash (segmentation fault).
Note: No public exploit code exists; this is a theoretical demonstration.
Blue Team (Defense & Detection)
Detection:
- Monitor for crashes of
yasmprocesses. - Use file integrity monitoring to detect malicious
.asmfiles. - Implement input validation for assembly files in CI/CD pipelines.
Mitigation:
- Avoid processing untrusted assembly files with YASM 1.3.0.86.g9def.
- Use alternative assemblers (e.g., NASM) until a patch is available.
- Apply memory protection mechanisms (ASLR, NX) to limit impact.
Indicators of Compromise (IOCs)
- File Hashes (malicious
.asmfile):- MD5:
d41d8cd98f00b204e9800998ecf8427e(example) - SHA256:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(example)
- MD5:
- Process Anomalies:
yasmprocess crashes with signal SIGSEGV. - Log Entries: Core dumps or segmentation fault logs in
/var/log/syslogordmesg.
Detection Engineering
YARA Rule
rule CVE_2023_49556_YASM_BufferOverflow {
meta:
description = "Detects malicious assembly files targeting CVE-2023-49556"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-49556"
strings:
$overflow = { 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 } // 'A' * 16
condition:
$overflow and filesize > 1000
}
Sigma Rule
title: YASM Buffer Overflow Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2023-49556 via YASM crashes
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/yasm'
CommandLine|contains: '.asm'
condition: selection
falsepositives:
- Legitimate assembly compilation
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2023-49556 YASM Buffer Overflow Attempt"; flow:to_server; content:"|41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41|"; threshold:type limit, track by_src, count 1, seconds 60; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Do not process untrusted assembly files with YASM 1.3.0.86.g9def.
- Short-term: Switch to an alternative assembler (e.g., NASM, GNU Assembler).
- Long-term: Monitor YASM repository for patches; apply when available.
- Workaround: Use input sanitization to limit expression term lengths in assembly files.
Valters IT
Securing Digital Frontiers