CVE-2026-58126: Verified Repro With Script Download
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://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 No distinct bypass or alternate-trigger variant was confirmed. Static review found that PGImageExchangeQueueSvc.exe can instantiate the same PGImageExchQueue.ExchangeForm that registers tcp://<host>:22222/PGImageExchange, but this is the same endpoint/sink and the Wine service-start harness did not runtime-confirm a s…
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.
Variant Analysis & Alternative Triggers for CVE-2026-58126
No distinct validated bypass or alternate-trigger variant was confirmed in this stage. The parent vulnerability is the unauthenticated .NET Remoting TCP endpoint registered by PGImageExchQueue.exe / PGImageExchangeQueueSvc.exe as tcp://<host>:22222/PGImageExchange. Static review found one concrete alternate hosting path: the Windows service executable PGImageExchangeQueueSvc.exe creates PGImageExchQueue.ExchangeForm, whose startup path registers the same unauthenticated TcpChannel and PGImageExchange well-known object. This is not a separate sink or fix bypass; it is the service-hosted form of the same vulnerable endpoint. Runtime validation of that service-hosted path in Wine was inconclusive because a service OnStart harness did not get the endpoint listening, while the already-confirmed direct product executable path remains the reliable reproduction. Public advisory material and latest-version URL probes did not identify a fixed vendor build for CVE-2026-58126, so no patched-version bypass could be claimed.
Fix Coverage / Assumptions
No public fix commit, patch diff, or fixed PACS Scan release for CVE-2026-58126 was identified. The third-party advisory reviewed during this stage states that PACSgear PACS Scan 5.2.1 is affected and that the affected version range remains undefined. Social/advisory search results also described the product as having no available fix at the time of review. Because there is no concrete fix, there is no validated fix invariant to bypass.
The required defensive invariant for a complete fix is clear from the root cause: every code path that creates the product remoting channel must either remove .NET Remoting exposure or require authentication/authorization and safe deserialization before any remote object invocation. The relevant code path in the 5.2.1 binary is PGImageExchQueue.ExchangeForm startup: it constructs System.Runtime.Remoting.Channels.Tcp.TcpChannel using CImageQueueSettings.RemotingPort, registers it with ChannelServices.RegisterChannel(..., false), and calls RemotingConfiguration.RegisterWellKnownServiceType(typeof(CRemote), "PGImageExchange", WellKnownObjectMode.Singleton). No authentication check was found around this registration.
What a complete fix must cover:
PGImageExchQueue.exedirect GUI/process startup ofExchangeForm.PGImageExchangeQueueSvc.exeservice startup, because itsService1.Start()constructs the samePGImageExchQueue.ExchangeForm.- Any installer/configuration route that changes
RemotingPortbut still exposes aTcpChannelwith the same unsafe formatter behavior.
Variant / Alternate Trigger
Tested / reviewed candidates:
- Service-hosted endpoint candidate:
PGImageExchangeQueueSvc.exe->PGImageExchangeQueueSvc.Service1.OnStart()->Service1.Start()->new PGImageExchQueue.ExchangeForm()-> same remoting registration. Static IL confirms this path, but it is not a materially different sink from the parent; it is the normal Windows service host for the same endpoint. A Wine reflection harness attempting to invokeOnStart()did not produce a listening TCP/22222 endpoint, so this was not runtime-confirmed as a distinct trigger in the sandbox. - Other Image Exchange Service binaries: Static scan of the 5.2.1 Image Exchange Service directory found remoting/channel registration only in
PGImageExchQueue.exe;PGImageExchangeQueueSvc.exereferences the sameExchangeFormfrom that assembly. No separateTcpChannel,HttpChannel,IpcChannel, or additional ObjectURI was found in sibling DLLs/executables in that product service directory. - Newer PACS Scan packages: URL probes found downloadable
PacsSCAN5.3.zip,PacsSCAN5.3.1.zip, andPacsSCAN5.3.3.zip. The 5.3/5.3.1 extracted package layout did not expose the vulnerablePGImageExchQueue.exe/PGImageExchangeQueueSvc.exepair through the same MSI extraction path, and 5.3.3 is packaged as an InstallShield setup executable that could not be fully non-interactively extracted in this environment. No runtime-tested fixed/latest bypass was therefore confirmed.
Exact parent entry point remains: unauthenticated .NET Remoting TCP endpoint tcp://127.0.0.1:22222/PGImageExchange in PACS Scan 5.2.1.
- Package/component affected: Hyland/PACSgear PACS Scan 5.2.1, Image Exchange Service (
PGImageExchQueue.exe,PGImageExchangeQueueSvc.exe, and relatedPGImageExchQueueassembly code). - Affected versions as tested: PACS Scan 5.2.1 vendor package
https://download.pacsgear.com/download/PacsSCAN5.2.1.zipwithPGImageExchQueue.exeSHA256853e7ea4ac56cc85df9a21a81c993a36ac3bff803e35b7ba3aa7c1438a28525candPGImageExchangeQueueSvc.exeSHA25695c8fcb4a934dd809951916e74872ccce0cb8e201f3ad0508542c316be3d1299. - Risk level and consequences: Critical for the parent vulnerability. An unauthenticated network caller can reach the remoting endpoint, obtain a server-side
WebClientthrough the MBRO primitive, read/write files in the product context, and chain writes into code execution when a service path is started/restarted.
Impact Parity
- Disclosed/claimed maximum impact for the parent: unauthenticated remote code execution as the PACSgear service account / SYSTEM on Windows by exploiting
.NET Remotingon TCP/22222 and planting code in the application directory. - Reproduced impact from this variant run: no new distinct variant impact was reproduced. The variant stage re-used source/static evidence from the successful parent reproduction and performed additional static/version/candidate checks.
- Parity:
nonefor a new variant or bypass. The parent reproduction remainsfullfor product-path code execution, but that is not a distinct variant finding. - Not demonstrated: a fixed-version bypass; service-hosted endpoint runtime reachability via
PGImageExchangeQueueSvc.exeunder Wine; execution on native Windows service control manager.
Root Cause
The same underlying bug is an unauthenticated .NET Remoting channel with unsafe deserialization/remoting behavior. In the parent product binary, PGImageExchQueue.ExchangeForm constructs a TcpChannel, registers it without channel security (ChannelServices.RegisterChannel(..., false)), and publishes a MarshalByRefObject-derived CRemote object at PGImageExchange. Because no authentication or authorization is enforced before remoting messages are processed, the MBRO/WebClient technique can instantiate and use a server-side System.Net.WebClient to access file:// URIs from the server context.
No fix commit is known. The complete mitigation should remove or strongly constrain the remoting channel in every host that creates ExchangeForm, not only one executable name.
Reproduction Steps
- Run
bundle/vuln_variant/reproduction_steps.sh. - The script performs a bounded variant check: it logs vulnerable 5.2.1 source identity, statically confirms the direct and service-hosted remoting registration paths, attempts a service-host runtime harness, probes/downloads newer package metadata when available, and records that no distinct bypass is validated.
- Expected result: the script exits
1to indicate no bypass/variant was reproduced, but it completes cleanly and writes logs underbundle/logs/vuln_variant/plus structured manifests underbundle/vuln_variant/.
Evidence
Key evidence files:
bundle/logs/vuln_variant/product_remoting_surface_scan.log— static scan showingTcpChannel,ChannelServices.RegisterChannel, andRegisterWellKnownServiceType(..., "PGImageExchange", ...)only in thePGImageExchQueuepath and showing the service executable references the same form/service name.bundle/logs/vuln_variant/latest_version_url_probe.log— URL probes for candidate newer/fixed package downloads.bundle/logs/vuln_variant/latest_533_zip_listing.log,latest_533_setup_extract_probe.log,version_530_probe.log, andversion_530_extract_scan.log— latest/newer package extraction/version evidence and extraction limitations.bundle/logs/vuln_variant/security_scope_review.logandpdf_security_strings.log— review of available vendor documentation/security-scope material.bundle/logs/vuln_variant/service_onstart_manual_test.logandservice_onstart_server*.log— attempted service-hosted endpoint runtime harness logs.
Environment details: Wine and native .NET 4 under Wine were available from the parent reproduction; Mono, mcs, monodis, xvfb-run, curl, unzip, and msiextract were available and logged in tool_availability.log.
Recommendations / Next Steps
- Treat the fix as incomplete unless it covers all code paths that instantiate
PGImageExchQueue.ExchangeForm, especially bothPGImageExchQueue.exeandPGImageExchangeQueueSvc.exe. - Remove the .NET Remoting TCP endpoint if possible. If the endpoint must remain, require mutual authentication and authorization before remoting dispatch, disable dangerous binary formatter/deserialization behavior, and bind only to trusted interfaces.
- Add regression tests that attempt the MBRO/WebClient primitive against every host process and service mode that can register
PGImageExchange. - Harden the service/application directory ACLs so the service identity cannot be used to overwrite code-loading locations through an arbitrary-write primitive.
- Publish clear fixed-version metadata and a vendor advisory so downstream validation can compare vulnerable and fixed source/binary identities.
Additional Notes
The variant result is negative by design: the only concrete alternate path found is the Windows service host for the same vulnerable endpoint, which does not cross a new trust boundary or reach a different sink. The final reproduction script is expected to be idempotent and to exit 1 after completing its checks because no distinct bypass is claimed.
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.