Download Netsparker
Pricing
Blog
Contact
Netsparker

Possibility of controlling the src attribute of base tag in the HTML

Netsparker detected that it's possible to control the src attribute of base tag in the HTML. base tag allows an attacker to control the base path for all of the resources, this can allow an attacker to load external scripts and resources to execute JavaScript on the context of the page hence the impact would be same with a cross-site scripting attack. Cross-site scripting allows an attacker to execute a dynamic script (JavaScript, VBScript) in the context of the application.

This allows several different attack opportunities, mostly hijacking the current session of the user or changing the look of the page by changing the HTML on the fly to steal the user's credentials. This happens because the input entered by a user has been interpreted as HTML/JavaScript/VBScript by the browser. Cross-site scripting targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' sessions, an attacker might attack an administrator to gain full control over the application.

Impact

Depending on the content of the page this vulnerability might not be directly exploitable. When it's exploitable there are many different attacks that can be leveraged through the use of cross-site scripting, including:
  • Hijacking user's active session.
  • Mounting phishing attacks.
  • Intercepting data and performing man-in-the-middle attacks.

Remedy

Do not allow user input to control the base tag. Whitelist it if the dynamic usage is necessary.

External References


Go back to the Complete list of Vulnerability Checks.