S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
medium·Product Based Web Vulnerabilities·Updated Feb 19, 2025

Unpkg Hyperscript Content-Security-Policy Bypass Scanner

This scanner detects the use of Unpkg Hyperscript in digital assets. It identifies vulnerabilities related to Content-Security-Policy bypass, potentially exposing systems to cross-site scripting (XSS) attacks by malicious actors. Ensuring secure implementation can help protect against these threats.

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
2.3k
Times Used
continuous scan runs
5.8k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
Detail

Unpkg Hyperscript is a library that developers use for frontend scripting tasks, typically included through the Unpkg CDN. It is leveraged in web development projects, allowing developers to incorporate dynamic client-side scripting features into web applications. By utilizing raw scripting capabilities, developers can enhance interactivity, running scripts responsively within browsers.

The vulnerability that this scanner detects involves a bypass of Content-Security-Policy (CSP) controls when Unpkg Hyperscript is implemented incorrectly. A compromised CSP can allow attackers to perform Cross-Site Scripting (XSS) attacks. Such attacks enable malicious scripts to execute in browsers, potentially leading to unauthorized data access or site manipulation.

Technically, this vulnerability centers around improper inclusion and handling of hyperscript.org scripts from the unpkg.com CDN without adequate CSP restrictions. The use of the `<script>` HTML tag in conjunction with unbounded CSP rules allows adversaries to execute arbitrary JavaScript payloads. Key elements include scripting from unpkg.com inadvertently relaxing security postures meant to block untrusted scripts.

The exploitation of this vulnerability can lead to several adverse effects, primarily involving unauthorized script execution. By exploiting CSP deficiencies, attackers could hijack user sessions, deface websites, or exfiltrate sensitive information. Moreover, the lack of proper CSP controls could expose web applications to further injection-based vulnerabilities that threaten both data integrity and confidentiality.

REFERENCES

Solution Advice
  • Implement strict Content-Security-Policy rules that whitelisted only trusted sources for scripts, such as self-hosted libraries.
  • Regularly audit and update any third-party scripts and libraries used in your application to ensure they are kept to a minimum necessary version.
  • Deploy script integrity checks (e.g., Subresource Integrity, SRI) to verify the authenticity of the resources.
  • Consider using nonces or hashes in your CSP for better control over which scripts the browser can execute.
  • Run regular security scans and vulnerability assessments to detect and address new vulnerabilities promptly.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

Unpkg Hyperscript Content-Security-Policy Bypass Scanner | S4E