Security Vulnerability Report
Severity: Critical (CVSS 4.0: 10.0)
CWE: CWE-78 (OS Command Injection)
CVE Request: CAN-2026-2030800 (submitted to MITRE)
Affected Versions: All BWA versions (0 through 0.7.19)
Description
BWA's kopen() function in kopen.c (lines 286-309) accepts filenames starting with < and passes the remainder directly to execl("/bin/sh", "sh", "-c", ...) for shell execution without any input sanitization.
Vulnerable Code
// kopen.c:309
if (!need_shell) {
argv = cmd2argv(p + 1);
execvp(argv[0], argv);
} else execl("/bin/sh", "sh", "-c", p + 1, NULL); // COMMAND INJECTION
Proof of Concept
bwa mem ref.fa "< id > /tmp/pwned.txt; echo ACGT; #"
cat /tmp/pwned.txt # shows output of 'id' command
Confirmed Impact
- Arbitrary command execution as the BWA process user
- Credential theft (environment variables, SSH keys)
- Arbitrary file read/write/delete
- Reverse shell capability
- Tested and confirmed with 7 distinct attack scenarios
Attack Surfaces
- Bioinformatics pipelines with untrusted FASTQ filenames
- Galaxy/Nextflow/Snakemake workflows
- Shared HPC clusters
- Web-based genomics tools wrapping BWA
Remediation
- Remove the
< pipe feature, OR
- Require explicit opt-in flag (
--enable-pipe), OR
- Sanitize input by rejecting shell metacharacters
Reporter
jabir-dev (GitHub: https://github.com/jabir-dev)
Security Vulnerability Report
Severity: Critical (CVSS 4.0: 10.0)
CWE: CWE-78 (OS Command Injection)
CVE Request: CAN-2026-2030800 (submitted to MITRE)
Affected Versions: All BWA versions (0 through 0.7.19)
Description
BWA's
kopen()function inkopen.c(lines 286-309) accepts filenames starting with<and passes the remainder directly toexecl("/bin/sh", "sh", "-c", ...)for shell execution without any input sanitization.Vulnerable Code
Proof of Concept
Confirmed Impact
Attack Surfaces
Remediation
<pipe feature, OR--enable-pipe), ORReporter
jabir-dev (GitHub: https://github.com/jabir-dev)