Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-priv BSim credentials
-
DeliveryConnect to BSim network query protocol
-
ExploitSubmit crafted filter value with SQL payload
-
ExecutionPayload concatenated into PostgreSQL query
-
PersistInjected SQL executes with BSim DB privileges
-
ImpactRead, modify, or delete signature data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must possess valid low-privilege credentials to a BSim server (PR:L) and must be able to reach the BSim network query protocol endpoint backing PostgreSQL; the vulnerable code path is specifically the BSim filter types that accept user-supplied values. Exploitation is limited to deployments that actually run a networked BSim server with a PostgreSQL backend - pure single-user Ghidra installs without BSim are not exposed via the described vector. No user interaction is required (UI:N) and complexity is low (AC:L), so any authenticated BSim user submitting a search request is positioned to exploit it; the practical limit is whether the BSim server is exposed beyond trusted analyst networks. |
| Impact | The CVSS 4.0 score of 8.7 (High) reflects network attack vector (AV:N), low complexity (AC:L), and high impact to confidentiality, integrity and availability of the vulnerable component (VC:H/VI:H/VA:H), but requires low privileges (PR:L) - meaning the attacker must already be an authenticated BSim user. There is no EPSS score, KEV listing, or public POC provided in the source data, so the signals point to a real but not-yet-weaponized issue: serious where BSim servers are network-exposed to semi-trusted users, but lower urgency for isolated single-analyst or air-gapped deployments. The PR:L requirement is the key limiting factor - internet-exposed BSim servers with weak account hygiene are the realistic concern, not opportunistic mass exploitation. No conflicting signals were observed in the supplied data; absence of EPSS/KEV simply reflects this being a recently disclosed, vendor-coordinated issue rather than evidence of low real-world risk. |
| Exploit ScenarioDerived | An attacker with low-privileged credentials to a network-reachable BSim server crafts a malicious filter value within a BSim search request, embedding SQL statements that escape the intended query context. Because the filter is concatenated directly into the PostgreSQL query, the attacker's payload executes with the BSim service's database privileges, allowing them to exfiltrate the entire signature corpus, tamper with similarity results to mislead reverse engineering efforts, or drop tables to deny service. No public exploit identified at time of analysis, but the vulnerability class is well-understood and trivial to weaponize once a BSim filter syntax reference is consulted. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jun 10, 2026
SQL injection in Ghidra's BSim binary-similarity component (versions before 12.1) allows authenticated remote attackers to inject arbitrary SQL via filter types that concatenate user-supplied values directly into PostgreSQL queries. Successful exploitation lets an attacker read, modify, or delete contents of the backing BSim PostgreSQL database used to store function signatures. No public exploit identified at time of analysis, though a vendor security advisory has been published by NSA on GitHub.
Earlier versions of this analysis (2)
SQL injection in Ghidra's BSim feature (versions before 12.1) allows authenticated remote attackers to execute arbitrary SQL against the backing PostgreSQL database by abusing unescaped filter values in the BSim network query protocol. The flaw enables reading, modifying, or deleting binary similarity database contents and was reported by VulnCheck; no public exploit identified at time of analysis. CVSS 4.0 scores it 8.7 (High) with low attack complexity and low privileges required.
SQL injection in Ghidra BSim before version 12.1 allows authenticated remote attackers to inject arbitrary SQL through BSim filter types that concatenate user-supplied values directly into PostgreSQL queries. The flaw enables unauthorized read, modification, or deletion of backend database contents via the BSim network query protocol. No public exploit identified at time of analysis, but a vendor security advisory has been published by the National Security Agency.
RemediationAI
Vendor-released patch: upgrade Ghidra to version 12.1 or later, which introduces proper escaping/parameterization for BSim filter values; see the NSA GHSA advisory at https://github.com/NationalSecurityAgency/ghidra/security/advisories/GHSA-8r4f-65cr-fwxm for the official fix notes. Where immediate upgrade is not feasible, restrict network reachability of the BSim PostgreSQL-backed server to trusted analysts only (firewall the BSim listening port, place it behind a VPN, or bind it to localhost), and rotate or tighten BSim user credentials to ensure PR:L cannot be satisfied by stale or shared accounts; the trade-off is reduced collaboration since remote analysts will lose access until they reach the trusted network. Additionally, ensure the PostgreSQL role used by BSim follows least privilege so that any successful injection is constrained to BSim's own database rather than wider PostgreSQL contents, accepting the operational cost of more granular role management.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Ghidra is the National Security Agency's open-source software reverse engineering (SRE) framework, and BSim is its function-similarity subsystem that stores signature data in a PostgreSQL backend and is queried over a network protocol. The flaw is a textbook CWE-89 (Improper Neutralization of Special Elements used in an SQL Command): BSim's filter type implementations build SQL by string-concatenating user-controlled filter values rather than using parameterized queries or proper escaping. Because the queries execute against the PostgreSQL backend with the BSim service's privileges, any injected SQL inherits those database rights, giving attackers direct access to the underlying signature store. The CPE confirms scope is the Ghidra application itself (cpe:2.3:a:nationalsecurityagency:ghidra) across all versions prior to the fix.
Know when Ghidra gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
5DescriptionCVE.org
Ghidra before 12.1 contains a SQL injection vulnerability in BSim filter types that concatenate user-supplied values directly into SQL queries without escaping or parameterization. Remote attackers can inject arbitrary SQL via the BSim network query protocol to read, modify, or delete data in the PostgreSQL database.
Articles & Coverage 2
Executive ViewAI
Ghidra's BSim binary-similarity component (versions before 12.1) contains an authenticated SQL injection vulnerability in database filter operations that could allow users to read, modify, or delete function signature data stored in PostgreSQL. This affects security research and malware analysis teams using Ghidra, risking exposure of proprietary analysis findings and reverse-engineering intelligence, with no vendor-released patch currently available.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict network access to Ghidra servers and PostgreSQL databases; (2) Limit user privileges to essential BSim operations only; (3) Enforce multi-factor authentication for all Ghidra access; (4) Deploy database activity monitoring to detect and alert on suspicious SQL patterns in filter queries; (5) Implement input validation rules to reject special characters in filter parameters.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Ghidra/RuntimeScripts/Linux/support/launch.sh in NSA Ghidra through 10.2.2 passes user-provided input into eval, leading
NSA Ghidra through 9.0.4, when experimental mode is enabled, allows arbitrary code execution if the Read XML Files featu
NSA Ghidra before 9.0.1 allows XXE when a project is opened or restored, or a tool is imported, as demonstrated by a pro
NSA Ghidra before 9.0.2 is vulnerable to DLL hijacking because it loads jansi.dll from the current working directory. Ra
In NSA Ghidra before 9.1, path traversal can occur in RestoreTask.java (from the package ghidra.app.plugin.core.archive)
Command injection in NSA Ghidra (versions before 12.0.3) executes arbitrary commands when analysts click on maliciously
Authentication bypass in NSA Ghidra versions prior to 12.1 allows any holder of a valid CA-signed certificate to imperso
SQL injection in Ghidra's PostgreSQL collaboration backend (versions 11.0 through pre-12.1) allows authenticated users t
Remote code execution in NSA Ghidra before version 12.1 allows attackers to execute arbitrary commands when a user opens
Command injection in Ghidra versions before 12.1 on Windows allows attackers to execute arbitrary OS commands under the
Arbitrary file write in NSA's Ghidra reverse-engineering framework before version 12.0.4 allows attackers to escape the
Arbitrary file write in NSA Ghidra versions prior to 12.0.2 allows local attackers to achieve code execution by tricking
EUVD-2026-36017
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB