WebRTC Abused: New Variant of Credit Card Skimming Scripts on Shopping Sites

Popular shopping sites implanted with skimming scripts using WebRTC data channels to exfiltrate credit card information
Security researchers discovered malicious scripts on multiple popular shopping sites using WebRTC for credit card skimming. They masquerade as checkout page components, intercepting card numbers, expiration dates, and CVVs as users enter them, and bypass traditional HTTP-request-based detection via RTCDataChannel. The article analyzes why WebRTC has become a new tool: traditional Magecart-style attacks rely on fetch/XHR and are easily identified by domain blacklists and CSP logs, whereas WebRTC data channel traffic blends with normal real-time communications and is hard for detection rules to cover; the supply chain formed by numerous third-party scripts on checkout pages is the main injection entry point. Defense requires strengthening third-party script admission and integrity verification, runtime monitoring of payment form field access, and continuous script asset inventory.

When the Payment Page Becomes a Data Exfiltration Channel
According to InfoHawk, security researchers have discovered malicious scripts on multiple popular shopping sites that use WebRTC technology for credit card skimming. These scripts masquerade as legitimate checkout page components, intercepting card numbers, expiration dates, and security codes the moment users enter them, and use WebRTC data channels to bypass traditional network monitoring and send the information directly to attacker-controlled servers.
The discovery first sparked discussion on Hacker News, where the post garnered 299 points and 161 comments, indicating that the security community's attention to the payment page attack surface remains high.
Why WebRTC Has Become a New Tool for Skimming
Limitations of Traditional Skimming Scripts
Over the past few years, Magecart-style attacks have primarily relied on injecting JavaScript into pages and then sending stolen data to external domains via fetch or XMLHttpRequest. Such outbound requests are relatively easy to identify in browser developer tools and Content Security Policy (CSP) logs, and many e-commerce platforms have deployed detection rules based on domain blacklists.
Magecart-style attacks take their name from a series of skimming campaigns targeting e-commerce checkout pages exposed in the 2010s. The typical technique is to inject a small piece of JavaScript into the page hosting the payment form, listen for input events, and send concatenated fields such as card number, expiration date, and CVV to an attacker's domain. These attacks have remained effective for so long because checkout pages generally aggregate a large number of third-party scripts, and any compromised supply chain link can become an injection point. Early detection approaches revolved around outbound requests: comparing whether the destination domain is on an allowlist and checking whether the request body contains strings matching card number formats (e.g., passing the Luhn check). The reason WebRTC data channels pose a new challenge is precisely that they bypass this HTTP-request-centric observation model, rendering existing domain blacklists and request body regex rules ineffective.
The Stealth of Data Channels
WebRTC provides RTCDataChannel, which allows two endpoints to establish a peer-to-peer connection and transmit arbitrary data. For attackers, this mechanism offers several conveniences: the connection does not necessarily follow conventional HTTP request paths, traffic characteristics blend in with normal WebRTC usage (such as video customer service and real-time collaboration), and detection rules based on URLs and request bodies often fail to cover it. The script only needs to establish a data channel when the page loads to continuously exfiltrate form fields.
RTCDataChannel is the interface in the WebRTC specification for transmitting arbitrary application data between peers, typically built on SCTP over DTLS and using ICE for NAT traversal. Unlike WebSocket, the data channel connection establishment process involves signaling exchange, candidate address gathering, and connectivity checks, ultimately potentially forming a channel that does not traverse the page origin server's conventional request path. From a detection perspective, this means traffic may not appear as a fetch or XHR to an external domain, nor may it necessarily appear as a normal request entry in the browser developer tools' Network panel. It should be noted that WebRTC is still constrained by the same-origin policy and permission model, and establishing a connection typically requires initial negotiation via STUN/TURN servers or a signaling channel, so being completely "trace-free" is not realistic; however, for detection systems centered on URLs and request bodies, its visibility does indeed decrease significantly.
Natural Fit with the Checkout Flow
E-commerce checkout processes themselves heavily use third-party scripts—payment gateways, analytics tools, A/B testing, customer service plugins. Attackers only need to compromise any one of these supply chain nodes, or inject code through a compromised third-party CDN, to have malicious logic load alongside legitimate scripts. InfoHawk's report noted that the affected sites are all high-traffic shopping platforms, indicating attackers are clearly selecting targets with large exposure and complex checkout flows.
Subresource Integrity (SRI) is a browser mechanism that allows pages to attach cryptographic hashes when referencing external scripts or styles, refusing to execute if the resource content does not match the hash. It is quite effective against tampered CDN resources but has clear boundaries: SRI requires resource content to be fixed, while many third-party scripts (analytics, A/B testing, customer service plugins) inherently require dynamic updates and cannot have pre-set hashes at all; meanwhile, SRI only validates loaded content and cannot constrain script behavior after execution, nor can it prevent scripts from fetching and executing other code at runtime. Therefore, in practical checkout page supply chain governance, SRI can often only cover a few stable dependencies, with more relying on admission review, version locking, and runtime behavior monitoring to fill the gaps.
Practical Impact on E-commerce Platforms and Consumers
For platforms, the tricky part of such scripts is the difficulty of discovery. Malicious code may only activate at specific times, in specific regions, or under specific user agents, and routine crawler scans and static code audits may not trigger it. Once publicly disclosed, platforms face not only data breach notification obligations but also pressure at the payment card industry compliance level.
For consumers, the risk is concentrated at the moment of checkout: card number and CVV being intercepted simultaneously is sufficient to initiate card-not-present transactions. Since malicious scripts run in the merchant's own page context, browser security prompts on the user side are basically not triggered, which is why skimming attacks have remained difficult to eradicate over the years.
Discussion in the Hacker News comment section focused on two points: first, merchants generally lack governance over third-party scripts; second, existing CSP policies have limited constraints on non-HTTP outbound channels like WebRTC.
What the Defense Side Can Do
From a technical perspective, feasible mitigation directions include: implementing stricter admission and integrity verification for third-party scripts on checkout pages (such as Subresource Integrity); restricting connect-src in CSP while paying attention to WebRTC-related policy capabilities; and performing runtime monitoring of payment form field read behavior, with anomalous access triggering alerts.
For security teams, the more fundamental issue is supply chain visibility—many platforms do not know exactly which scripts are loaded on their checkout pages, who maintains them, and when they are updated. This WebRTC skimming incident once again demonstrates that attack surface management for payment pages cannot rely solely on periodic scanning but requires continuous script asset inventory.
Frequently Asked Questions
Do WebRTC skimming scripts affect all browsers? WebRTC is a standard capability of mainstream browsers. The report did not specify the exact range of affected browsers; actual risk depends on how the script is injected and whether the page loads malicious code.
How can ordinary users reduce risk? Using saved payment methods with trusted merchants and enabling bank transaction notifications makes it easier to detect anomalous charges promptly than manually entering card numbers.
What should merchants prioritize for investigation? The complete list of third-party scripts loaded on checkout pages, along with their update records and source domains, is the starting point for investigation.
One-line Summary
Popular shopping sites have been implanted with skimming scripts that use WebRTC data channels to exfiltrate credit card information
Paragraph Summary
Security researchers have discovered malicious scripts on multiple popular shopping sites that use WebRTC for credit card skimming. They masquerade as checkout page components, intercepting data when users enter card numbers, expiration dates, and CVVs, and bypass traditional HTTP-request-based detection via RTCDataChannel. The article analyzes why WebRTC has become a new tool: traditional Magecart-style attacks rely on fetch/XHR and are easily identified by domain blacklists and CSP logs, whereas WebRTC data channel traffic characteristics blend with normal real-time communications and are difficult for detection rules to cover; the supply chain formed by numerous third-party scripts on checkout pages is the main injection entry point. The defense side needs to strengthen third-party script admission and integrity verification, monitor payment form field access at runtime, and continuously inventory script assets.
Related articles

Prospero: A Lightweight Native AI Coding Tool Built with ImGui
Prospero is a bloat-free native AI coding tool built with ImGui, emphasizing lightweight design, high performance, and low dependencies. This article analyzes its design philosophy, technical choices, and the divergence between platformization and toolization in AI coding tools.

Single GB10 Card Hits 101 tok/s: Inkling 2 Mini Performance Tested on vLLM
A developer shared on Hacker News running Inkling 2 Mini with vLLM on a single GB10 at 101 tok/s. This article analyzes the technical context, the significance of vLLM with small models on single cards, and caveats for interpreting tok/s metrics.

Show HN: Bouncing Ball Prediction Market Game with AI Traders as Counterparties
bouncemarket is a real-time bouncing ball prediction market game featuring deterministic server-side simulation with SSE push and AI traders who provide liquidity and exit when more than five real players join. This article breaks down its technical implementation and product design.