Found it. Now, in order.

Malicious JavaScript Injected on Your Website: The First Hours After You Find a Tampered Script

Checkout still works. Orders still arrive. Nobody has complained. Then someone opens the browser's developer tools on the payment page and sees a familiar script calling an address nobody in the company has ever heard of. The calm was the attack working as designed.

November 19, 2026 · 10 min read

shop.acmeboots.com · tampered script response
Checks after a skimmer turned up on the checkout
Code is off the page; two doors are still open
  • PassTampered script saved with timestamps
  • PassHAR recording of the checkout exported
  • PassMalicious tag paused in the tag managernew version
  • FailTag manager users with publish rights6 people
  • WarnPayment API keys rotatedpending
  • PassProcessor, attorney and insurer told
  • FailBrowser policy limits where data can gonone set
Illustrative: sample response checklist for a fictional bootmaker's online store

The short answer

If you find malicious JavaScript on your website, copy the evidence before removing it: the tampered file, a recording of what the page loaded, and the account or file it came from. Then take it off the page, find how it got in, rotate every login and key it could reach, and clean. Tell your processor, attorney and insurer if card or customer data may be exposed. Not legal advice.

On this page
  1. A familiar script, calling an address nobody owns
  2. Copy the tampered script before anyone deletes it
  3. Pull the code off the page, not off the record
  4. Vendor, tag manager, plugin, server or settings field: finding the way in
  5. Rotate everything the script, or its author, could touch
  6. Your processor, your attorney, your insurer: their calls, not ours
  7. Afterward: the controls that make a second attempt harder
  8. The cost of the first day, and the fixed-price WordPress route

A familiar script, calling an address nobody owns

The discovery is rarely dramatic. A developer checks the network panel, the part of the browser's developer tools that lists everything a page loads, and spots a request to an odd domain. The script responsible is one the business chose on purpose: the chat widget, the analytics tag, the testing tool. Its contents are not. There is a long line of scrambled text and a call to atob, a browser function that turns encoded text back into readable code. Somebody wanted this to be hard to read.

This page covers the hours after that moment. It is about tampered JavaScript, code that was changed or added so that a visitor's browser runs it on your page, rather than a defaced or redirecting server, though the two often travel together. If the whole site is hijacked, our hacked website emergency page covers taking a server offline. The order below is ours: preserve, contain, find the way in, rotate, clean, tell the right people, then lock down.

Tampered scripts arrive from more directions than owners expect. On its status page, in a post dated November 17, 2026 at 01:02 UTC, Optimizely said an unauthorized party "exploited a vulnerability in Experimentation" and used it to add malicious JavaScript to some customer projects. Those customers' own servers were never touched. Our account of the Optimizely hack explains how the code traveled.

Copy the tampered script before anyone deletes it

The instinct is to rip the code out. Give it ten minutes first. Once a vendor or a well-meaning teammate cleans the script, the only copy of what it did may be gone, and the people who will need it later, your processor, your insurer, your attorney and any forensic firm they appoint, will ask for exactly that.

  1. 1

    Save the script as it was served

    Open the script's address in a browser and save the file, or save it from the developer tools. Save the full page too. Put the date and time in every file name.

  2. 2

    Record what the page loaded

    Most browsers can export a HAR file from the network panel: a recording of every request the page made, including where it sent data. Export one from the checkout and one from the home page. Store them privately, since they can contain session cookies.

  3. 3

    Screenshot with the clock showing

    Capture the network panel with the strange request visible and the system clock in frame. It sounds fussy. It settles arguments later about when the code was live.

  4. 4

    Export the place the code lived

    If the script came from a tag manager, export the container and its version history. If it came from a vendor project, copy its custom code settings. If it came from your own files, ask the host for a snapshot.

  5. 5

    List everyone who could change it

    Vendor users, tag manager publishers, content system administrators, hosting and repository logins. Write the list down. Do not delete anyone yet; their accounts are evidence too.

  6. 6

    Start one shared timeline

    When it was found, by whom, what each person did and at what time. Every later step goes on it.

Pull the code off the page, not off the record

Containment means visitors stop receiving the code. It does not mean the code stops existing. The fastest safe move depends on where it lives, and in every case the old version should survive somewhere your team can read but not run.

  • A tag in a tag manager: pause or remove the tag and publish a new version. The old version stays in the history, which is your evidence.
  • A vendor script you load: remove the line that loads it, or switch the vendor off in your settings, until the vendor confirms its file is clean and you have rotated your access to its account.
  • A plugin or theme on your site: deactivate it, or take the site offline from outside the server as the hacked website page describes, if you cannot tell what else it changed.
  • Your own code: deploy the last version you know was clean and keep the tampered build for comparison.
  • Card entry itself: if shoppers type cards into your own form, consider switching to your processor's hosted payment page until the work is done.

That last item has evidence behind it. Report URI, a company that sells script monitoring, reported on November 16, 2026 that the Optimizely payload skimmed card details from sites' own forms, while cards typed into a payment company's hosted fields were out of its reach. If removing a tag breaks checkout, and sometimes it does, the checkout emergency page covers getting payments moving again without ever collecting card numbers by hand.

Vendor, tag manager, plugin, server or settings field: finding the way in

Cleaning before you know the way in is how the same code comes back next week. The table lists the usual hiding places for injected JavaScript and what we examine in each. The evidence you saved above is what tells you which row you are in.

Where tampered JavaScript usually lives, the likely way in, and what DataCram checks first
Where the code livedLikely way inWhat we check
A vendor's hosted script, such as testing, chat or reviewsThe vendor itself was compromised, or someone got into your account with that vendorThe vendor's notices, your account's users and tokens, and recent changes to your settings
A tag manager containerA login with publish rights was phished, shared, or left with a former agencyEvery user and permission level, the version history, and who published what and when
A WordPress plugin or themeA known vulnerability in an outdated componentInstalled versions against published advisories, modified files and unknown admin users
Your own server or deploy pipelineStolen hosting, SFTP or code repository credentialsAccess logs, recent deploys and any keys stored in code
A content system setting that prints on every pageA compromised administrator account pasting code into a header or footer fieldRecently edited settings, widgets and custom code fields

Tag managers deserve particular suspicion because their permissions are broad. Google's Tag Manager help page on users and permissions, read November 18, 2026, describes a Publish level with "full rights to create versions, workspaces, make edits, and publish." Anyone holding it can change what every page runs without going near your server. Our tag manager cleanup trims that list for good.

Flat sticker of a determined armadillo in a mustard hard hat spraying a fire extinguisher at a smoking browser window, thick espresso outlines, cream paper
Putting out the fire comes after saving a sample of the smoke.

Rotate everything the script, or its author, could touch

Report URI's advice to Optimizely customers, published November 16 and updated November 17, 2026, works as a template for any tampered script: review and rotate users, API tokens and integrations, rotate secrets kept in cookies that scripts can read, and treat cards entered during the exposure as possibly exposed. A cookie is a small file a site stores in the visitor's browser, often to keep them signed in. Some are locked away from scripts; the readable ones can be copied, and rotating makes the copies worthless.

  • Vendor accounts and API tokens for the service that carried the code, plus any integrations connected to it.
  • Tag manager users: remove anyone without a current reason, and cut publish rights to the fewest people who need them.
  • Content system administrators, hosting, SFTP, database and repository credentials, changed from a device you trust.
  • Payment API keys, if the site's code or settings held them anywhere a script or intruder could reach.
  • Session secrets and script-readable cookies, so stolen sessions stop working, even if customers must sign in again.
  • Two-factor sign-in, switched on for every account that offers it.
Cleaning a tampered script without changing the login that wrote it is mopping under a running tap.

Your processor, your attorney, your insurer: their calls, not ours

If the script touched a card form, a login form or any field holding personal details, this is no longer only a website repair. Call your payment processor, your attorney and your insurer before cleanup is finished, and let counsel decide what customers hear and when. Breach notice rules vary by state; our data breach first hours page explains why the order of those calls matters.

Our part is the technical record they will ask for: when the code first appeared, as far as the evidence shows, what it did, which pages carried it, when it came off and what changed afterward. We do not tell you whether you must notify anyone. We are not a PCI Qualified Security Assessor. And we cannot promise to find every trace an intruder left; we will say plainly what the evidence shows and where it runs out.

Afterward: the controls that make a second attempt harder

Once the code is gone and the doors have new locks, the goal is that the next tampered script is refused, or at least noticed quickly. None of these makes a site unhackable. Each removes something an attacker relied on this time.

A fresh inventory

A script audit lists what loads, who owns it and what gets cut. Every removed script is one less vendor whose access can be borrowed.

A browser policy

A content security policy refuses scripts you did not approve and limits where your pages may send data.

Someone watching

Script monitoring from real browsers, so a changed file is noticed by us rather than by your customers' banks.

Card rule records

For stores, the payment page script records that PCI DSS asks for, built from what this incident taught you.

Fewer borrowed parts

Swapping risky plugins for custom code shrinks the list of strangers who can change your pages.

The cost of the first day, and the fixed-price WordPress route

We respond the same business day; our hours are on the contact page. Tampered script response is from $575, depending on complexity, with a written estimate before work starts. Where the code lived, how many accounts need rotating and whether a server is also compromised move the number. Our malware removal and website security service covers longer cleanups.

For a WordPress site where the code sits in your own files or database, the Fix it now malware cleanup is $349, paid online on the WordPress malware removal page or through Fix it now. We start within one business day of payment, with a full refund if we can't fix it. Code carried by an outside vendor or a tag manager is a quoted job instead.

You may not need us at all. If a vendor's own script was tampered with, the vendor has cleaned it and your account was never involved, the work is the rotation list and the processor call above, which your own team may handle. Not sure the site is even reachable? Is my site down answers in seconds, and the emergency repair hub covers other outages. DataCram is a San Antonio web studio, building since 1999. See our work, the website security overview, or call (210) 346-0848.

Questions owners ask about website security

Not before you copy it. Save the tampered file, a HAR recording of what the page loaded and screenshots with the time showing, and export the tag manager or vendor settings it came from. Then take it off the page. Once the code is gone, it is hard to prove what it did, and your processor, insurer and attorney may need exactly that.

Open the checkout in a browser, open the developer tools' network panel and look for requests to addresses you do not recognize, especially after typing in a form. Scripts full of scrambled text are another warning sign. A processor alert or customers reporting fraud after buying from you are reasons to look now. A script audit checks every page properly.

It depends on what data was exposed, where your customers live and what your processor agreement says, and we cannot answer it for you. Breach notice rules vary by state. Talk to your attorney, insurer and payment processor before you notify anyone or finish cleaning. This is not legal advice.

Usually not on its own. Whoever added it had a way in: a vendor account, a tag manager login, a vulnerable plugin or stolen hosting credentials. Until that door is closed and every login and key it could reach is rotated, the same code can return. Find the way in before you call it clean.

It is for WordPress sites where the injected code sits in your own files or database. It costs $349, paid online; we start within one business day of payment and refund in full if we can't fix it. Code carried by an outside vendor or a tag manager is handled as a quoted job from $575.

Hosted fields keep the card number away from your page's own code, which helps. Report URI found the November 2026 Optimizely payload could not reach cards typed into a payment company's hosted fields. Every incident differs, though, and a script may still have read logins, addresses or other details. Ask your processor to review what it saw during the exposure window.

Keep reading

Free · No obligation

Tell us what the script is doing

Describe where you found it, what it calls and whether it touches checkout or login pages. We reply the same business day with the first steps and a written estimate.

Which of these sounds like you? (pick any)

Rather talk now? Call (210) 346-0848.

CallGet a quote