ForumsResourcesAdform Supply Chain Breach: Detecting JS-based Crypto Address Swapping

Adform Supply Chain Breach: Detecting JS-based Crypto Address Swapping

SCADA_Guru_Ivan 8/2/2026 USER

Just saw the report on the Adform incident where attackers poisoned a JavaScript file to swap crypto wallet addresses on client sites. This is a textbook supply chain attack leveraging the ubiquity of ad tech.

Since Adform detected it on July 27, 2026, the immediate threat is contained, but the vector remains a major concern. No CVE has been assigned yet because this was a compromise of their infrastructure rather than a specific software vulnerability, but the impact is significant.

The attackers essentially turned the ad script into a clipper malware. It likely monitored the DOM or clipboard events to overwrite Bitcoin addresses. Here is a simplified example of what that malicious payload looks like:

// Malicious payload logic
document.addEventListener('copy', (event) => {
    const selection = window.getSelection().toString();
    // Checks for standard BTC address format
    const btcRegex = /\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b/;
    if (btcRegex.test(selection)) {
        event.preventDefault();
        event.clipboardData.setData('text/plain', 'ATTACKER_CONTROLLED_ADDRESS');
    }
});


**Mitigation & Detection:**

Standard Subresource Integrity (SRI) is difficult here because ad scripts are dynamic and change frequently. However, you can implement stricter CSP policies to limit where scripts can connect to.

For detection, you can scan your site's external dependencies. Here is a quick Python script to identify potential third-party risks:

import requests
from bs4 import BeautifulSoup

def audit_scripts(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.text, 'html.parser')
    for script in soup.find_all('script', src=True):
        src = script['src']
        if 'adform' in src or 'doubleclick' in src:
            print(f"[!] Third-party Ad Script found: {src}")

audit_scripts('https://your-site.com')


Is anyone actually successfully implementing SRI for dynamic adtech, or are we all just accepting the risk of supply chain compromise in exchange for revenue?
VU
Vuln_Hunter_Nina8/2/2026

SRI is basically a non-starter for most ad tech. The scripts are minified, versioned, and change multiple times a day. Trying to keep the integrity hash in sync with the ad server's cache-busting parameters is a full-time job.

We've moved to a 'sandboxed' approach for ads. We render them in a specific iframe with the sandbox attribute stripped of permissions like allow-scripts or allow-same-origin where possible, though that breaks a lot of ad functionality.

IN
Incident_Cmdr_Tanya8/2/2026

From a SOC perspective, this is a nightmare to detect at the network edge because the connection is to a legitimate CDN serving a legitimate-looking file size.

We've started leveraging browser telemetry. If we see unexpected clipboard access events originating from pages hosting Adform scripts, we flag the user session for investigation. It's noisy, but it caught a similar skimming attempt last month.

PH
PhysSec_Marcus8/2/2026

This is why I advocate for 'script allowlisting' over 'blocklisting'. Instead of loading whatever the publisher throws in the header, we proxy all third-party scripts through an internal gateway. The gateway fetches the script, scans it for regex patterns associated with wallet addresses or card skimming, and then serves it to the client.

It adds latency, but the visibility is worth it.

Verified Access Required

To maintain the integrity of our intelligence feeds, only verified partners and security professionals can post replies.

Request Access

Thread Stats

Created8/2/2026
Last Active8/2/2026
Replies3
Views166