/

CVE-2026-58126

Severity:

CRITICAL RISK

(9.8)

Unauthenticated RCE via .NET Remoting in PACS Scan 5.2.1

CVE-2026-58126

Analyzed

Vulnerability type

Category:

Remote Code Execution

CWE:

CWE-306, CWE-502

Impact:

Unauthenticated Remote Code Execution as NT AUTHORITY\SYSTEM

Severity:

CRITICAL RISK

(9.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

PACSgear PACS Scan 5.2.1 exposes an unauthenticated .NET Remoting TCP service that allows remote attackers to read and write arbitrary files on the host.

By abusing this file write primitive with DLL hijacking in a service that runs as NT AUTHORITY\SYSTEM, an attacker can achieve full remote code execution after a service restart.

Affected context

This vulnerability appears in PACSgear PACS Scan 5.2.1 deployments where the PGImageExchQueue.exe .NET Remoting TCP service is reachable on port 22222.

Systems that expose this port on internal networks or, more critically, to external networks are at risk, particularly when the service lacks authentication or access controls.

The issue is most impactful on hosts where PGImageExchangeQueueSvc.exe runs with elevated privileges and loads DLLs from the application directory during startup.

Exploit preconditions

  • Attack surface: Network-accessible .NET Remoting TCP service on port 22222
  • Required access: Ability to connect to the PGImageExchQueue.exe service over TCP; no prior authentication required
  • Trigger point: Invocation of remoting methods that permit arbitrary file read/write operations in the application directory or other accessible paths
  • Why exploitation is possible: The remoting endpoint does not enforce authentication (CWE-306), and the service trusts incoming serialized data structures (related to CWE-502), enabling arbitrary file manipulation that can be combined with DLL search order behavior for code execution

Why this happens

At its core, the vulnerability stems from an exposed remote service that fails to enforce any authentication or authorization checks before accepting and processing client requests, aligning with CWE-306: Missing Authentication for Critical Function.

The .NET Remoting TCP service allows operations that result in arbitrary file reads and writes, effectively granting file system control to any network client reaching port 22222.

This is compounded by a DLL loading pattern in PGImageExchangeQueueSvc.exe where missing DLLs such as CRYPTSP.DLL are loaded from the application directory, a classic DLL hijacking scenario.

Together, these behaviors form an insecure design where unauthenticated remote calls can implant a malicious DLL that will later be loaded by a privileged Windows service, culminating in system-level remote code execution.

Potential impact

  • Remote attackers may gain arbitrary file read access, potentially exposing sensitive medical data or system configuration files.
  • Remote attackers can write arbitrary files, including planting malicious DLLs or modifying application configuration.
  • Attackers could achieve remote code execution as NT AUTHORITY\SYSTEM when the vulnerable service restarts and loads the hijacked DLL.
  • Compromise of the underlying Windows host, enabling lateral movement across the healthcare network.
  • Integrity and availability impacts on clinical workflows that rely on PACS Scan integration.

General mitigation guidance

Effective mitigation focuses on reducing exposure of critical remote services and hardening how privileged components load external resources.

Common defensive patterns include:

  • Enforcing strong authentication and authorization on all remote management or data exchange interfaces, especially .NET Remoting endpoints.
  • Restricting or eliminating functionality that allows arbitrary file write operations from remotely supplied data.
  • Configuring services to load DLLs from secure, system-controlled paths only, avoiding application-directory search behavior where possible.
  • Running services with least-privilege accounts instead of NT AUTHORITY\SYSTEM, reducing the blast radius of any compromise.
  • Limiting network access to port 22222 with firewall rules, VPNs, or application-layer gateways so only trusted hosts can connect.
  • Adopting secure-by-default settings where remote interfaces are disabled or locked down unless explicitly needed.

How teams detect issues like this

Organizations can detect and manage this class of vulnerability using multiple complementary approaches:

  • Network security monitoring to identify unexpected inbound connections to port 22222 and anomalous usage of .NET Remoting services.
  • Static analysis or manual code review of remote service implementations to flag missing authentication checks, broad file operation APIs, and trust of serialized inputs.
  • Configuration and policy reviews ensuring privileged Windows services do not load DLLs from writable application directories and adhere to strict search paths.
  • Host-based intrusion detection to monitor for creation of suspicious DLLs in application directories and changes to service binaries.
  • Regular security assessments and penetration tests focusing on legacy remoting technologies and elevated services in medical imaging and PACS environments.

Sources

SourceLink
gist.github.comgist.github.com/VAMorales/6dc232729cdd517fa30d581fbcd98d8f
hyland.comhyland.com/en/solutions/products/pacsgear
vulncheck.comvulncheck.com/advisories/pacsgear-pacs-scan-unauthenticated-rce-via-net-remoting-tcp-service

Frequently asked

questions

Exploitability depends primarily on network reachability of port 22222. If the .NET Remoting service is accessible from broader internal networks or the internet without segmentation, any remote attacker who can connect to that port may be able to exploit the vulnerability.

No. The core problem is missing authentication on the critical file operation interface. Attackers do not need valid credentials or prior access; they only need network connectivity to the exposed service.

The safest pattern is to enforce robust authentication and authorization on all remote interfaces, remove or strictly constrain any remote file write capabilities, and ensure privileged services load code only from trusted, non-writable locations. Where possible, replace legacy remoting mechanisms with modern, secure communication channels.

Prevention relies on secure design principles: treat all remote interfaces as untrusted by default, implement authentication and authorization before performing sensitive actions, avoid exposing arbitrary file operations, restrict library loading paths, and incorporate security reviews and automated checks into the development and deployment pipeline, especially for healthcare and other critical systems.

Find out what's already
exploitable in your codebase.