A widget is a small embedded component that adds functionality to a website, such as reviews, chat, analytics, or social sharing. It is often delivered as an external script or iframe from a vendor or third party, then rendered inside the merchant’s page. Because it runs in the browser alongside the site’s own code, a widget can inherit a strong level of trust from users and from the page itself.
In cyber security, widgets matter because they expand the attack surface. If a widget vendor is compromised, or if the widget is modified in transit or through a supply-chain attack, malicious code can execute on many sites at once. That code may change content, track users, redirect traffic, or steal data entered on the page. Defenders reduce this risk by inventorying third-party embeds, limiting script privileges with Content Security Policy, monitoring for unexpected changes, and reviewing vendor access and update paths.


