logo

Database

Http Missing Script Src Attribute

Description

Detects when a web application's Content Security Policy (CSP) header is missing or has an insufficient script-src directive. A missing or weak script-src directive in CSP allows execution of JavaScript from unauthorized sources, potentially enabling Cross-Site Scripting (XSS) attacks.

Detection Strategy

    Examines HTTP response headers for Content-Security-Policy header presence

    Analyzes the Content-Security-Policy header value to check if script-src directive exists and is properly configured

    Reports a vulnerability if the CSP header is missing script-src directive or uses unsafe configurations like 'unsafe-inline' or 'unsafe-eval'