__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Malicious HTML Tags February 2, 2000 18:00 GMT Number K-021 ______________________________________________________________________________ PROBLEM: Malicious HTML tags or script may be included in a dynamically generated web page. PLATFORM: Web browsers and web servers that dynamically generate pages based on unvalidated input. All platforms. DAMAGE: Unauthorized access may be gained to documentation, server services, and intranet servers. Domain based security policies may be violated, and web form behavior can be altered. SOLUTION: Follow solution procedure listed in the advisory. ______________________________________________________________________________ VULNERABILITY Risk is high. The capability for exploiting the vulnerability ASSESSMENT: is readily available. ______________________________________________________________________________ [ Start CERT Advisory ] CERT Advisory CA-2000-02 Malicious HTML Tags Embedded in Client Web Requests This advisory is being published jointly by the CERT Coordination Center, DoD- CERT, the DoD Joint Task Force for Computer Network Defense (JTF-CND), the Federal Computer Incident Response Capability (FedCIRC), and the National Infrastructure Protection Center (NIPC). Original release date: February 2, 2000 A complete revision history is at the end of this file. Systems Affected * Web browsers * Web servers that dynamically generate pages based on unvalidated input Overview A web site may inadvertently include malicious HTML tags or script in a dynamically generated page based on unvalidated input from untrustworthy sources. This can be a problem when a web server does not adequately ensure that generated pages are properly encoded to prevent unintended execution of scripts, and when input is not validated to prevent malicious HTML from being presented to the user. I. Description Background Most web browsers have the capability to interpret scripts embedded in web pages downloaded from a web server. Such scripts may be written in a variety of scripting languages and are run by the client's browser. Most browsers are installed with the capability to run scripts enabled by default. Malicious code provided by one client for another client Sites that host discussion groups with web interfaces have long guarded against a vulnerability where one client embeds malicious HTML tags in a message intended for another client. For example, an attacker might post a message like Hello message board. This is a message. This is the end of my message. When a victim with scripts enabled in their browser reads this message, the malicious code may be executed unexpectedly. Scripting tags that can be embedded in this way include "> Click here When an unsuspecting user clicks on this link, the URL sent to example.com includes the malicious code. If the web server sends a page back to the user including the value of mycomment, the malicious code may be executed unexpectedly on the client. This example also applies to untrusted links followed in email or newsgroup messages. Abuse of Other Tags In addition to scripting tags, other HTML tags such as the