Skip to content
Guides

A script or SaaS vendor on your website was compromised: what to do in the first 24 hours

Quick answer, Nov 17, 2026As of 17 November 2026, if a vendor whose script runs on your website was compromised, treat every page that loads it as serving the attacker's code. Remove or block the script first, keep a copy of what visitors received, list every page and form it touched, then bring the vendor into your response (NIST CSF 2.0 GV.SC-08).

Why the vendor's breach is your incident

CISA's Defending Against Software Supply Chain Attacks (April 2021), "Introduction", describes the pattern: an attacker "infiltrates a software vendor's network and employs malicious code to compromise the software before the vendor sends it to their customers." Under "Hijacking Updates" it adds that an attacker can insert "malware into the outgoing update".

Our reading: a script your pages load from a vendor's server has no install step for you to hold back. The vendor's compromise reaches your visitors as soon as its server changes the file.

The W3C Subresource Integrity specification (Working Draft, 20 March 2026) states the goal in section 1.1 "Goals": "Compromise of a third-party service should not automatically mean compromise of every site which includes its scripts."

The first day, in order

The order below is ours, worked out from the NIST elements cited. It is not a published standard.

StepWhat to doWhere it is written
1. Declare and name a leadDeclare an incident; name one incident lead; call your incident response provider if you have oneNIST SP 800-61r3 Table 3, RS.MA-01 C1 and R2
2. ContainRemove the tag from your templates or tag manager, or block its domain, on every site that loads itSP 800-61r3 Table 3, RS.MI-01 N1 and R1
3. Keep the evidenceSave the script as it was served, response headers, tag manager version history and CDN or web logs before anyone cleans upSP 800-61r3 Table 3, RS.AN-06 R1, RS.AN-07 R1
4. Scope itWhich pages, forms, logged-in areas and checkout pages loaded the script, and between which timesSP 800-61r3 Table 3, RS.AN-03 R1; Table 2, ID.AM-04 R1
5. Bring the vendor inAsk for its timeline, what it served and when, and its indicatorsCSF 2.0 GV.SC-08; SP 800-61r3 Table 2, GV.SC-05 R1
6. Remove persistenceCheck for other tags, tag manager users and vendor-held keys added or used during the windowSP 800-61r3 Table 3, RS.MI-02 N1 and R1
7. Decide who to tellCustomers, partners, regulators, law enforcement and, for card payments, your acquirerSP 800-61r3 Table 3, RS.CO-02 R3 to R5; PCI SSC
8. Restore with checksBring the script back only pinned and hashed, under a policy that reports what loadsW3C SRI 3.7; W3C CSP Level 3 3.2; SP 800-61r3 Table 3, RC.RP-05 R1

Contain first, then collect

SP 800-61r3 (April 2025), Table 3, RS.MI-01 N1 defines containment as "preventing the expansion of an incident." Every page view while the script loads exposes another visitor, so removal comes first. RS.MI-01 R1 lets handlers "manually select and perform containment actions", which is what pulling a tag is.

Take the evidence in the same hour. RS.AN-07 R1: "Collect and retain evidence from an incident in accordance with the organization's evidence preservation procedures and data retention policies." If the vendor has already replaced the file, your CDN or web logs may be the only record of what your visitors received. RS.AN-06 R1 asks that incident records stay confidential and that "only authorized personnel have access."

Scope: which pages, which visitors, which hours

RS.AN-03 R1: "Determine the sequence of events that have occurred during the incident and which assets and resources were involved in each of those events." Here the assets are the pages and forms that loaded the script. Pages where visitors type passwords or card numbers come first.

That is quicker with an inventory. SP 800-61r3 Table 2, ID.AM-04 R1: "Current and automatically updated inventories of the services provided by the organization's suppliers should be available". One use it names is "identifying 'shadow IT' usage", such as a tag a marketing team added without telling security.

What to ask the vendor on the first call

CSF 2.0 (26 February 2024), GV.SC-08: "Relevant suppliers and other third parties are included in incident planning, response, and recovery activities." SP 800-61r3 Table 2, GV.SC-05 R1, says supplier requirements "should include cybersecurity performance and vulnerability, threat, and incident disclosure and information sharing." From those, our list for the call:

  • When did the changed script start and stop being served, and from which addresses?
  • Which domains did the malicious code contact? Those are your indicators.
  • Do any keys or accounts the vendor holds for your systems need rotating?
  • What will the vendor share in writing, and when?

If card payments ran on those pages

The PCI Security Standards Council (blog, 10 March 2025) says PCI DSS v4.x Requirements 6.4.3 and 11.6.1 "focus on ensuring that payment page scripts are properly authorized, checked for integrity, and monitored for tampering." The information supplement it announces is intended for any entity "with a webpage that can impact the security of e-commerce payments by using embedded iframes", and it tells entities to work with "acquirers or payment brands" on reporting.

Putting the script back

W3C SRI section 3.7, "Handling integrity violations": the browser "will refuse to render or execute responses that fail an integrity check". A pinned hash stops a changed file from running. Our reading: it also stops legitimate vendor updates, so each update needs your review before you change the hash.

W3C CSP Level 3 (Working Draft, 27 October 2026), section 3.2, describes a report-only header for "watching for violation reports, and then moving to an enforced policy once they've gained confidence in that behavior." SP 800-61r3 Table 3, RC.RP-05 R1: "remediate the root causes of the incident before production use."

Where this sits next to the other pages

An attacker inside your own build pipeline is in GitHub Actions secrets leaked: what to rotate first. Rehearsing a compromised tool on developer machines is in A developer tool was compromised: what should your tabletop rehearse. Your data on a vendor's cloud is in Exercise a cloud vendor data breach. A provider with admin access to your machines is in Your MSP's RMM tool just went dark, and the contract side is in Third-party risk after a provider-led breach.

If you need investigators on this, the criteria are in Choosing a cyber crisis response firm, or brief an advisor and we arrange a partner firm.

Questions

The vendor says it is fixed. Can we turn the tag back on? Not on its word alone. Ask for the root cause in writing, then follow step 8. RC.RP-05 R1 puts root-cause remediation before production use, and no step on this page guarantees a clean result.

Our checkout runs in the payment provider's iframe. Are we out of scope? Not necessarily. PCI SSC says its guidance covers a webpage that "can impact the security of e-commerce payments by using embedded iframes." Ask your acquirer.

Is this legal advice? No. This page is a procedural checklist drawn from the public record. Counsel decides what your contracts and your regulator require.

Brief an advisor