/

CVE-2026-52751

Severity:

HIGH RISK

(8.8)

Unsafe RMI Deserialization (CWE-502) in Ghidra Projects

CVE-2026-52751

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Unauthenticated Remote Code Execution on Client

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Ghidra contains an unsafe deserialization flaw in the client-side Shared-Project RMI connection logic that processes ghidra:// project URLs.

By tricking a user into opening a malicious project file, an attacker can trigger a Jython-based gadget chain and execute arbitrary commands without authentication.

Affected context

This vulnerability appears in Ghidra deployments where users open Shared Project configurations or project files that embed ghidra:// URLs.

The issue is exposed when the File → Open Project workflow processes project metadata and establishes RMI connections using serialized objects received from untrusted sources.

Environments where users routinely import or inspect externally supplied Ghidra projects are more likely to encounter the risky conditions.

Exploit preconditions

  • Attack surface: Client-side Ghidra instance handling project files and Shared-Project RMI connections
  • Required access: Ability to supply or influence a project file or configuration containing a malicious ghidra:// URL
  • Trigger point: User opens the crafted project via File → Open Project, causing RMI connection setup and object deserialization
  • Why exploitation is possible: The Shared-Project client code deserializes attacker-controlled data without sufficient validation, allowing a Jython 2.7.4 gadget chain to be invoked during deserialization

Why this happens

The root cause is the use of Java object deserialization over RMI channels without constraining or validating the classes being instantiated.

Ghidra's Shared-Project connection logic treats serialized data embedded in or referenced by ghidra:// project URLs as trusted, allowing arbitrary object graphs to be reconstructed on the client.

In combination with Jython 2.7.4 on the classpath, an attacker can leverage known gadget classes to execute commands when the deserialization process runs.

This pattern aligns with CWE-502: Deserialization of Untrusted Data, where untrusted serialized objects are processed as if they were benign application data.

Potential impact

  • Execution of arbitrary commands on the workstation running Ghidra
  • Compromise of the analyst's environment, including credentials and local tooling
  • Unauthorized access to local project data, binaries, and reverse-engineering artifacts
  • Use of the compromised host as a pivot to attack internal networks or repositories

General mitigation guidance

Mitigation typically focuses on tightening how serialized data is handled and reducing trust in external project inputs.

Common defensive patterns include:

  • Avoiding generic Java deserialization for RMI or replacing it with serialization frameworks that enforce type whitelists or contracts
  • Introducing explicit validation and class filtering for any deserialized objects involved in remote project connections
  • Treating external project files and ghidra:// URLs as untrusted input, with clear separation between parsing metadata and performing privileged operations
  • Running Ghidra with least-privilege user accounts and minimizing ambient system permissions where possible
  • Isolating high-risk workflows (e.g., opening untrusted projects) in separate, constrained environments such as sandboxes or disposable VMs

How teams detect issues like this

Detection efforts can focus on both code-level patterns and runtime behavior:

  • Static analysis or code review rules that flag usages of Java deserialization in RMI or network-facing components, especially where untrusted input can reach ObjectInputStream or similar APIs
  • Review of Shared-Project connection code paths for absence of class filtering, validation hooks, or type whitelists
  • Automated checks in CI pipelines to prevent introduction of new unsafe deserialization sites, particularly when adding third-party libraries with known gadget chains
  • Runtime monitoring or endpoint detection to alert on abnormal process execution originating from Ghidra, indicating possible gadget-chain exploitation

Sources

SourceLink
github.comgithub.com/NationalSecurityAgency/ghidra/commit/91a269103fe5d133c14ec3afa60280dccb94be5c
github.comgithub.com/NationalSecurityAgency/ghidra/security/advisories/GHSA-fgg5-g275-7742
vulncheck.comvulncheck.com/advisories/ghidra-remote-code-execution-via-unfiltered-rmi-deserialization-in-shared-project-connection

Frequently asked

questions

Yes. An attacker who can deliver a malicious project or configuration with a crafted ghidra:// URL can cause the client to connect and deserialize data, leading to remote code execution on the analyst's machine.

No explicit authentication to the attacker's endpoint is required. The core requirement is that a user opens an attacker-supplied project or configuration, which can be achieved via phishing, file sharing, or code repository poisoning.

Replace generic deserialization in Shared-Project RMI code with mechanisms that enforce strict type controls, such as class whitelists, and avoid relying on gadget-rich libraries for deserialization. Conceptually, only a minimal, vetted set of data-transfer objects should ever be reconstructed from remote input.

Adopt a policy that all serialized data from external or semi-trusted sources is treated as hostile, prohibit unrestricted deserialization in design guidelines, and integrate static analysis checks to block new unsafe deserialization usages from entering the codebase.

Find out what's already
exploitable in your codebase.