flawopen.com/Teardowns/polyfill-io-supply-chain-hijack
vulnerabilidade 소스 코드 심층 기술 분석 및 시스템 보안 강화 가이드: 취약점 근본 원인과 패치 메커니즘 분석.
수천 개의 식당이 오랫동안 신뢰할 수 있는 동일한 생수 배달 업체를 이용해 왔다고 상상해 보세요. 원 배달원이 은퇴하면서 악덕 업체에 사업권을 몰래 넘기자, 새 배달 기사가 식당 테이블을 살피며 특정 손님들의 음료에 위조 카지노 복권 티켓을 몰래 넣기 시작한 것과 같습니다.
Dynamic User-Agent PolyfillingConditional Payload EvasionDomain Ownership Transfer RiskSubresource Integrity (SRI)근본 원인은 오픈 소스 시스템의 검증되지 않은 경계 매개변수로 인해 상태 비동기화 및 보안 제어 우회가 발생한 데 있습니다.
In February 2024, the domain polyfill.io was purchased from its creator by Funnull, an operator associated with casino affiliate marketing.
The CDN edge inspected incoming HTTP requests. If the request was from an admin IP, Google bot, or desktop browser with DevTools open, it served normal, benign polyfills.
If the request was from an organic mobile visitor via search referrer, the server appended an obfuscated redirect payload: window.location.href = 'https://kucontent.com/...'.
Cloudflare and Fastly deployed automatic edge URL rewrites to replace polyfill.io with clean mirrors, while Google flagged all sites utilizing the script in search results.
<!-- VULNERABLE: Direct 3rd-party CDN script without integrity verification -->
<!DOCTYPE html>
<html>
<head>
<title>Production Web App</title>
<!-- Polyfill CDN serves arbitrary dynamic code controlled by third party -->
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=default,Array.prototype.flat"></script>
</head>
<body>
<h1>Welcome</h1>
</body>
</html>
<!-- SECURE: Native ES6+ or Self-Hosted Vendored Fallbacks with CSP & SRI -->
<!DOCTYPE html>
<html>
<head>
<title>Production Web App</title>
<!-- 1. Modern browsers require no polyfills (99%+ modern baseline) -->
<!-- 2. For legacy needs, bundle polyfills locally into your build pipeline -->
<script src="/static/vendor/core-js-bundle.min.js"
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
crossorigin="anonymous"></script>
<!-- 3. Strict Content Security Policy blocking untrusted third-party script sources -->
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC';">
</head>
<body>
<h1>Welcome</h1>
</body>
</html>