Patched Is Not Clean: Checking for Compromise After an Exploited Vulnerability
A vendor confirms that a flaw in an internet-facing system is being exploited. Your team applies the update, the scanner turns green and the ticket closes. It feels finished. It often isn't.
A patch fixes code. It does not remove a web shell an attacker dropped last week, revoke a session token they stole, or reset a password they already harvested. When exploitation started before you patched, "patched" and "clean" are two different questions, and only the first one has been answered.
This guide explains why patching does not evict an attacker, what tends to survive the update, and a five-step check to run after any patch for a vulnerability that was exploited before you fixed it.
Four cases where the patch was not the end
Citrix NetScaler, 2023: patched and still backdoored
In July 2023, attackers mass-exploited CVE-2023-3519 in Citrix NetScaler ADC and Gateway to plant web shells. Fox-IT, part of NCC Group, scanned for those implants and found that, as of August 14, 2023, 1,828 NetScalers still had a backdoor. Of those, 1,248 had already been patched. The update closed the vulnerability, but the web shell was still there and still worked. Fox-IT's explanation was simple: the devices had been patched, but nobody had checked them for signs of successful exploitation.
Citrix Bleed, 2023: the session outlives the fix
CVE-2023-4966, known as Citrix Bleed, let attackers steal session tokens and take over sessions that were already authenticated, which skipped multifactor authentication. Because a stolen session can stay valid after the update, Citrix told administrators in November 2023 to remove all active and persistent sessions after upgrading. Patching without killing sessions left the attacker logged in.
Ivanti Connect Secure, 2024: the checker said clean
In February 2024, CISA and partner agencies published advisory AA24-060B on attacks against Ivanti Connect Secure and Policy Secure gateways. In incident response, CISA found web shells on systems where Ivanti's Integrity Checker Tool reported no file mismatches, and warned that the tool's results could create a false sense of security. In lab research, CISA also found that an attacker may be able to keep root-level persistence despite factory resets. Its advice included assuming that credentials stored on the appliances were compromised and resetting them.
Magento PolyShell, 2026: the file stays on disk
CVE-2026-48356, called PolyShell by Sansec, lets attackers upload files to Adobe Commerce and Magento stores without credentials. Sansec observed attacks from March 2026. Adobe's fix for older supported release lines arrived in bulletin APSB26-73 on July 14, 2026, and CISA added the flaw to its Known Exploited Vulnerabilities catalog on October 27, 2026. Sansec's warning applies to every case in this article: even when execution is blocked, the uploaded file stays on disk. A store patched in July may still be carrying a file uploaded in March.
Why patching doesn't evict an attacker
An update replaces vulnerable code. Everything the attacker created or took while the code was vulnerable is state, and the update does not touch it. In practice, that state falls into a few groups:
- Files: web shells, implants and modified scripts left on the system.
- Sessions and tokens: authenticated sessions, cookies and API tokens that remain valid until they expire or are revoked.
- Credentials: passwords, keys and service account secrets read from the device or captured while it was compromised.
- Configuration: new admin accounts, scheduled tasks, changed settings or injected content.
- Footholds elsewhere: if the attacker moved from the edge device into the network, patching the edge device does nothing for the rest.
When to run a compromise assessment
You do not need a forensic review after every update. The trigger is narrower and easy to state: the vulnerability was exploited in the wild before you patched, and the affected system was reachable by the attacker during that window.
Three questions decide it:
- When did exploitation start? Use the vendor bulletin, CISA KEV and research from the firms that observed the attacks. Exploitation often starts before the patch, sometimes months before.
- When did you patch? Use the date the fix was verified on the system, not the date the ticket was opened.
- Was the system exposed in between? An internet-facing gateway or web store exposed during the window needs a check. An internal system with no route from the attacker is lower priority.
If the window is real, treat the system as possibly compromised until you have evidence otherwise. Our guide to the shrinking time to exploit explains why that window is growing more common.
A five-step check after the patch
1. Fix the window in writing
Record when exploitation began, when the system was patched and how exposed it was. That window defines the period your logs and file checks must cover.
2. Look for persistence
Use the indicators the vendor, CISA and incident responders publish: file paths, file names, network destinations and behaviors. Look for files you did not create, admin accounts you do not recognize, new scheduled tasks and changed content. Remember the Ivanti lesson: a vendor integrity tool is one input, not proof of a clean system.
3. Invalidate sessions and rotate secrets
Kill active sessions on the affected system. Rotate credentials, keys and tokens that were stored on it, passed through it or could have been read from it. For edge devices that handle authentication, that can include the service accounts they use to talk to your directory.
4. Hunt beyond the device
If the attacker had a foothold, assume they may have tried to move. Search the logs of systems the device can reach for activity from it during the window. A hypothesis-driven threat hunt is the right tool here.
5. Decide: clean, rebuild or replace, then close
When evidence of compromise appears, follow your incident response plan. For appliances where persistence may survive a reset, CISA's Ivanti advisory asked organizations to weigh the risk of keeping the device in service. Close the remediation ticket only when the patch is verified and the compromise check is done.
Metrics worth tracking
- Exposure window: days between the start of exploitation and your verified patch, for each exploited vulnerability.
- Compromise checks completed: the share of exploited-before-patch cases where steps 1 to 4 were done and documented.
- Findings from checks: how many checks found something. If the answer is ever more than zero, the process has paid for itself.
Frequently asked questions
Does a vendor integrity checker prove a device is clean? No. CISA found web shells on Ivanti systems that the integrity tool reported as having no file mismatches. Use those tools, but combine them with log review and published indicators.
Do I need this for every patch? No. Reserve it for vulnerabilities exploited in the wild before you patched, on systems the attacker could reach.
Is a factory reset enough? Not always. CISA's lab research on Ivanti gateways found that an attacker may keep root-level persistence despite a factory reset. Follow the vendor's and CISA's guidance for the specific product.
How priorIQ.ai helps
PriorIQ Core prioritizes vulnerabilities with CVSS, EPSS, CISA KEV, verified public exploits, exploit kits and the business exposure of each asset, so the exploited, exposed flaws that need a compromise check surface first, and it orchestrates remediation through to closure. SentinelIQ adds AI triage on top of the SIEM or XDR you already run, and its confirmed incidents raise remediation priority: if a host is under attack, its vulnerabilities move up the queue. BoardIQ shows confirmed incidents, hosts under attack and exploited-now CVEs in one executive cockpit. Our guide to closing the loop between the SOC and remediation explains how the pieces fit. Request a demo.