Supply chain attacks are when cybercriminals attack your third-party vendors in order to breach your site. Attackers exploit vulnerabilities in the third, fourth- and nth-party JavaScript running on your site to steal payment data and personally identifiable information (PII) from your users.
Up to 70% of the average website is made up of code from third parties and open source libraries. This code often calls other code, creating a supply chain of externally sourced JavaScript. Cybercriminals inject malicious scripts into vulnerable code in these external libraries, and websites that use the code now also have the malicious scripts running on their sites. These scripts skim payment data and personally identifiable information (PII) in digital skimming, Magecart, PII harvesting and formjacking attacks.
Falling victim to a supply chain attack exposes user data, damages brand reputation and leads to lawsuits due to noncompliance with privacy regulations. And without the right security protocols, supply chain attacks can go undetected for long periods of time. Recent research found that 93% of companies suffered a cybersecurity breach through weaknesses in their supply chain in 2021.
Web applications have two main components: the server and the client. The server holds the application code, stores data and processes operations. The client is the user’s browser where the web application is delivered.
To carry out supply chain attacks, cybercriminals can target the server or the client.
More than 99% of websites use code from third-party vendors to build their sites. Examples of this are social sharing buttons, advertising iframes, payment iframes, chatbots, analytics and metrics scripts, A/B testing scripts for experiments and helper libraries such as jQuery.
In order for such code to work, developers must grant the third-party JavaScript some level of access to their site, apps and data. This means that JavaScript has the ability to access, modify, create an alternative for and remove anything from the page, including UI elements, object prototypes, storage assets and network activity.
Cybercriminals understand the power that JavaScript has. They target weaknesses in this code, thereby gaining access to every website that uses it. The goal is to steal PII and payment information. This stolen data fuels a continuous cycle of cyberattacks, including credential stuffing, carding and account takeover (ATO). Here are a few of the vulnerabilities that are commonly exploited in supply chain attacks:
Client-side supply chain attacks can easily go undetected for several reasons.
Supply chain attacks negatively impact businesses in several ways.
All in all, supply chain attacks lead to severe financial losses and consequences.
The first step in preventing supply chain attacks is vetting your third-party code vendors. Before onboarding a new vendor, ask them detailed questions about their data security protocols and compliance with privacy regulations. Include specific security requirements and penalties for non-compliance in vendor contracts to mitigate the possibility of supply chain attacks.
Vetting your vendors is a great start, but the best way to prevent supply chain attacks is to enable automatic monitoring of all client-side JavaScript behavior on your website, so you can catch malicious code activity in action. Inventorying your website and network forms for anomalous behavior allows you to see client-side JavaScript at work. Take a zero-trust, least privilege approach to third-party vendors, and do not allow JavaScript code more access rights and privileges than are necessary for it to function properly. Continuously assess and validate JavaScript code that accesses your sites and networks.
Traditional cybersecurity solutions like web application firewalls (WAFs) are insufficient in protecting the client-side against client-side supply chain attacks. Some companies are placing their bets on static scanning of their site, not realizing the dynamic nature of malicious code. Solutions like sandboxing create significant hurdles in the website development process and break continuous integration and deployment cycles.
Content security policies (CSP) are often the first step for many web application security professionals. Because CSPs were originally used for protection against cross-site scripting, they need a lot of tuning. CSPs alone don’t provide any protection against a compromise of a trusted domain that can be used to inject a skimmer on the website. And with CSP, a script is either on or off. More granular control is needed to prevent data exposure with disrupting script functionality.
Modern client-side application security solutions can continuously monitor all of the scripts on your website for anomalous behavior, using CSP rules and granular JavaScript blocking to stop malicious script injections from loading and prevent data transfer.
HUMAN Client-Side Defense is a client-side application security solution that protects websites from client-side supply chain attacks. The solution continuously monitors and builds a behavioral baseline of all first-, third- or Nth-party client-side scripts on a site and flags anomalous activity, including behavior changes, communication with new network domains or DOM modifications. Client-Side Defense provides robust insights into JavaScript activity over time and uses HUMAN client-side mitigation, a combination of CSP and granular JavaScript blocking, to mitigate risk. This prevents data breaches and ensures compliance with privacy regulations.
What is Digital Skimming and How Does It Work?
What is Magecart? | Attack Types & Prevention
What is Personally Identifiable Information (PII) Harvesting?
What is Formjacking and How to Prevent It
What is PCI DSS Compliance? | Requirements & How to Comply