Description
The web application does not neutralize or incorrectly neutralizes scripting elements within attributes of HTML IMG tags, such as the src attribute.
Attackers can embed XSS exploits into the values for IMG attributes (e.g. SRC) that is streamed and then executed in a victim’s browser. Note that when the page is loaded into a user’s browsers, the exploit will automatically execute.
Modes of Introduction:
– Implementation
Likelihood of Exploit:
Related Weaknesses
Consequences
Confidentiality, Integrity, Availability: Read Application Data, Execute Unauthorized Code or Commands
Potential Mitigations
Phase: Implementation
Effectiveness:
Description:
Phase: Implementation
Effectiveness: Defense in Depth
Description:
To help mitigate XSS attacks against the user’s session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user’s session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XMLHTTPRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
CVE References
- CVE-2006-3211
- Stored XSS in a guestbook application using a javascript: URI in a bbcode img tag.
- CVE-2002-1649
- javascript URI scheme in IMG tag.
- CVE-2002-1803
- javascript URI scheme in IMG tag.
- CVE-2002-1804
- javascript URI scheme in IMG tag.
- CVE-2002-1805
- javascript URI scheme in IMG tag.
- CVE-2002-1806
- javascript URI scheme in IMG tag.
- CVE-2002-1807
- javascript URI scheme in IMG tag.
- CVE-2002-1808
- javascript URI scheme in IMG tag.
More Stories
The Most Dangerous Vulnerabilities in Apache Tomcat and How to Protect Against Them
Apache Tomcat is an open-source web server and servlet container that is widely used in enterprise environments to run Java...
ZDI-CAN-18333: A Critical Zero-Day Vulnerability in Microsoft Windows
Zero-day vulnerabilities are a serious threat to cybersecurity, as they can be exploited by malicious actors to gain unauthorized access...
CWE-669 – Incorrect Resource Transfer Between Spheres
Description The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere,...
CWE-67 – Improper Handling of Windows Device Names
Description The software constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a...
CWE-670 – Always-Incorrect Control Flow Implementation
Description The code contains a control flow path that does not reflect the algorithm that the path is intended to...
CWE-671 – Lack of Administrator Control over Security
Description The product uses security features in a way that prevents the product's administrator from tailoring security settings to reflect...