The script on your login page can read the password

News

The script on your login page can read the password

The script on your login page can read the password

On November 16, malicious code in Optimizely snippets ran on 178 organizations’ websites. Any script on a login page can read what people type. A passkey leaves it nothing to take.

Chad Spensky

·

A computer screen showing HTML code for a website

On November 16, a trusted script on 178 organizations’ websites turned malicious for a day. It went after cards, crypto and cookies. On a login page, the same script sits next to your password.

What happened on November 16

Optimizely Web lets a company run experiments on its own site by loading a JavaScript “snippet” from Optimizely’s servers. Each snippet carries a field called Project JavaScript: custom code the customer writes, which runs on every page. On November 16, an attacker wrote their own code into that field for customer after customer. Report URI found it in 188 of the 1,611 snippets it checked, belonging to 178 organizations, among them Zoom, the BBC, Salesforce, GitLab, HSBC and Equifax.

Optimizely says in its incident notice that the attacker “exploited a flaw in the Optimizely Web Experimentation account signup flow” and used it to “impersonate users on targeted customer accounts.” It says it closed the flaw within three hours of detecting it and that fewer than 5% of its customers were affected. Zscaler later counted more than 450 domains serving the malicious script.

Nothing on the affected sites themselves was breached. The file still came from cdn.optimizely.com, with Optimizely’s certificate, from a host every one of those sites already trusted.

Dot chart of 1,611 Optimizely snippets checked by Report URI on November 16, 2026, with 188 infected snippets shown in red. They belonged to 178 organizations; Zscaler later found more than 450 domains serving the script.
Report URI found the attacker’s code in 188 of the 1,611 Optimizely snippets it checked.

What the script went after

Every visitor got the same payload, which the attacker rebuilt 26 times over the day. According to Report URI’s analysis, it swapped cryptocurrency wallet addresses for the attacker’s, skimmed card numbers typed into a site’s own forms, sent screenshots and readable cookies from wallet and payment pages to the attacker, and loaded exploit kits on older iPhones and iPads. By 19:25 UTC, the attacker’s wallets had received about $7,040.

Two details matter for everyone else. Cards entered in hosted payment frames, such as Stripe’s or Adyen’s, were out of the script’s reach. And it could only read cookies that were not marked HttpOnly, the flag that forbids JavaScript from reading a cookie. Wherever a secret lived outside the page’s own JavaScript, the script could not get to it.

The login page was in scope

The infected domains included sign-in pages. Report URI lists signin.my.equifax.com, and Optimizely’s own login.optimizely.com carried the code. The researchers did not report the payload collecting passwords, and it would not have needed a new trick to do so. The skimmer already read form submissions looking for card numbers. A password field in a login form is the same kind of target. Zscaler’s advice to visitors includes changing passwords for accounts used on affected sites.

That is the uncomfortable part. A password typed into a page exists in that page as text, and every script the page loads runs with the same access to it. A login form is only as private as the least trustworthy script on it, and most sites load several scripts they did not write.

What the defenses can and cannot do

The standard advice is right. A Content Security Policy in enforcement mode limits which scripts run and where the page can send data, and Report URI notes it could have blocked key parts of this attack. Script monitoring catches a trusted file that suddenly changes. Keeping third-party scripts off sign-in and checkout pages shrinks the exposure, and HttpOnly keeps session cookies out of reach.

All of these reduce what a bad script can reach. None of them changes what a password is: a reusable secret that the user has to put into the page. As long as signing in means typing it, the login page is a place where it can be read.

Annotated mock of an infected sign-in page. 1: the attacker’s code inside the Optimizely snippet, served from a trusted CDN. 2: the password field, readable by every script on the page. 3: a hosted card frame from another origin, out of the script’s reach. 4: an HttpOnly session cookie that JavaScript cannot read, next to an ordinary cookie that it can.
On an infected page, the password field is open to every script. The hosted card frame and HttpOnly cookies are not.

What a passkey changes

With a passkey, the page never holds the secret. The server sends a random challenge, the authenticator signs it with a private key that stays on the device, and the server checks the signature for its own site. The WebAuthn specification requires those challenges to be random so that a signature cannot be replayed. A script watching the page sees one signature for one challenge, and it is worthless once it has been used.

Passkeys do not make a compromised page safe. A script running in a signed-in page can still act as the user while the page is open, and an attacker can still use a session cookie that JavaScript can read. What changes is what the attacker carries away: no password to try on other sites, nothing to sell, nothing to use next week.

This is how Allthenticate works. Your passkeys live in your phone’s Secure Element, the tamper-resistant chip built to keep keys from ever being copied out. When a site on your computer asks for one, the request goes to the phone through the computer’s FIDO key, the phone signs it, and the key never reaches the browser. Each sign-in the phone answers this way appears in the admin portal’s logs with the site, so an administrator can see where passkeys are in use. The login page has nothing to skim because nobody types anything into it.

What to do this week

  • If you use Optimizely Web, work through Zscaler’s checklist: audit every Project JavaScript field, review recent changes and account activity, and rotate tokens for the platform.

  • List every third-party script that loads on your sign-in and checkout pages, and remove the ones that do not need to be there.

  • Put a Content Security Policy in enforcement mode on those pages, including limits on where they can send data.

  • Mark session cookies HttpOnly.

  • Offer passkeys at sign-in and make them the default, so the login page stops being a place where a reusable secret gets typed.

The Optimizely attack lasted about a day and went after cards and crypto. The next one may go after passwords. The fix that holds up is to stop asking people to type one. You can try Allthenticate on your own phone, or talk to us about rolling out passkeys across your team.

On November 16, a trusted script on 178 organizations’ websites turned malicious for a day. It went after cards, crypto and cookies. On a login page, the same script sits next to your password.

What happened on November 16

Optimizely Web lets a company run experiments on its own site by loading a JavaScript “snippet” from Optimizely’s servers. Each snippet carries a field called Project JavaScript: custom code the customer writes, which runs on every page. On November 16, an attacker wrote their own code into that field for customer after customer. Report URI found it in 188 of the 1,611 snippets it checked, belonging to 178 organizations, among them Zoom, the BBC, Salesforce, GitLab, HSBC and Equifax.

Optimizely says in its incident notice that the attacker “exploited a flaw in the Optimizely Web Experimentation account signup flow” and used it to “impersonate users on targeted customer accounts.” It says it closed the flaw within three hours of detecting it and that fewer than 5% of its customers were affected. Zscaler later counted more than 450 domains serving the malicious script.

Nothing on the affected sites themselves was breached. The file still came from cdn.optimizely.com, with Optimizely’s certificate, from a host every one of those sites already trusted.

Dot chart of 1,611 Optimizely snippets checked by Report URI on November 16, 2026, with 188 infected snippets shown in red. They belonged to 178 organizations; Zscaler later found more than 450 domains serving the script.
Report URI found the attacker’s code in 188 of the 1,611 Optimizely snippets it checked.

What the script went after

Every visitor got the same payload, which the attacker rebuilt 26 times over the day. According to Report URI’s analysis, it swapped cryptocurrency wallet addresses for the attacker’s, skimmed card numbers typed into a site’s own forms, sent screenshots and readable cookies from wallet and payment pages to the attacker, and loaded exploit kits on older iPhones and iPads. By 19:25 UTC, the attacker’s wallets had received about $7,040.

Two details matter for everyone else. Cards entered in hosted payment frames, such as Stripe’s or Adyen’s, were out of the script’s reach. And it could only read cookies that were not marked HttpOnly, the flag that forbids JavaScript from reading a cookie. Wherever a secret lived outside the page’s own JavaScript, the script could not get to it.

The login page was in scope

The infected domains included sign-in pages. Report URI lists signin.my.equifax.com, and Optimizely’s own login.optimizely.com carried the code. The researchers did not report the payload collecting passwords, and it would not have needed a new trick to do so. The skimmer already read form submissions looking for card numbers. A password field in a login form is the same kind of target. Zscaler’s advice to visitors includes changing passwords for accounts used on affected sites.

That is the uncomfortable part. A password typed into a page exists in that page as text, and every script the page loads runs with the same access to it. A login form is only as private as the least trustworthy script on it, and most sites load several scripts they did not write.

What the defenses can and cannot do

The standard advice is right. A Content Security Policy in enforcement mode limits which scripts run and where the page can send data, and Report URI notes it could have blocked key parts of this attack. Script monitoring catches a trusted file that suddenly changes. Keeping third-party scripts off sign-in and checkout pages shrinks the exposure, and HttpOnly keeps session cookies out of reach.

All of these reduce what a bad script can reach. None of them changes what a password is: a reusable secret that the user has to put into the page. As long as signing in means typing it, the login page is a place where it can be read.

Annotated mock of an infected sign-in page. 1: the attacker’s code inside the Optimizely snippet, served from a trusted CDN. 2: the password field, readable by every script on the page. 3: a hosted card frame from another origin, out of the script’s reach. 4: an HttpOnly session cookie that JavaScript cannot read, next to an ordinary cookie that it can.
On an infected page, the password field is open to every script. The hosted card frame and HttpOnly cookies are not.

What a passkey changes

With a passkey, the page never holds the secret. The server sends a random challenge, the authenticator signs it with a private key that stays on the device, and the server checks the signature for its own site. The WebAuthn specification requires those challenges to be random so that a signature cannot be replayed. A script watching the page sees one signature for one challenge, and it is worthless once it has been used.

Passkeys do not make a compromised page safe. A script running in a signed-in page can still act as the user while the page is open, and an attacker can still use a session cookie that JavaScript can read. What changes is what the attacker carries away: no password to try on other sites, nothing to sell, nothing to use next week.

This is how Allthenticate works. Your passkeys live in your phone’s Secure Element, the tamper-resistant chip built to keep keys from ever being copied out. When a site on your computer asks for one, the request goes to the phone through the computer’s FIDO key, the phone signs it, and the key never reaches the browser. Each sign-in the phone answers this way appears in the admin portal’s logs with the site, so an administrator can see where passkeys are in use. The login page has nothing to skim because nobody types anything into it.

What to do this week

  • If you use Optimizely Web, work through Zscaler’s checklist: audit every Project JavaScript field, review recent changes and account activity, and rotate tokens for the platform.

  • List every third-party script that loads on your sign-in and checkout pages, and remove the ones that do not need to be there.

  • Put a Content Security Policy in enforcement mode on those pages, including limits on where they can send data.

  • Mark session cookies HttpOnly.

  • Offer passkeys at sign-in and make them the default, so the login page stops being a place where a reusable secret gets typed.

The Optimizely attack lasted about a day and went after cards and crypto. The next one may go after passwords. The fix that holds up is to stop asking people to type one. You can try Allthenticate on your own phone, or talk to us about rolling out passkeys across your team.

Your phone is the key

Passwordless login for desktops, SSH, SSO and doors, with proximity lock when you walk away.

Download Allthenticate