# CVE-2002-1533: Jetty Javascript Inclusion Vulnerability

> Remote attackers can inject arbitrary HTML or script via crafted JSP filenames, potentially executing code in victim browsers.

- **Severity:** Medium 5.8 (`AV:N/AC:M/Au:N/C:P/I:P/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 18 Mar 2003
- **Updated:** 8 Aug 2024
- **Also known as:** GHSA-5mq8-h82p-wjf2

## What is CVE-2002-1533?

CVE-2002-1533 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Mar 2003. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Cross-site scripting (XSS) vulnerability in Jetty JSP servlet engine allows remote attackers to insert arbitrary HTML or script via an HTTP request to a .jsp file whose name contains the malicious script and some encoded linefeed characters (%0a).

## Which versions are affected by CVE-2002-1533?

2 open source packages ship an affected version, including org.mortbay.jetty:jetty. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.mortbay.jetty:jetty` | Maven | All versions | 4.1.1 |
| `org.mortbay.jetty:jetty` | Maven | All versions | 4.1.1 |

Products: Jetty Jetty.

## How do I fix CVE-2002-1533?

Upgrade org.mortbay.jetty:jetty to 4.1.1 or later.

## Is CVE-2002-1533 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2002-1533 exists.

Public exploit code:

- Jetty 4.1 Servlet Engine - Cross-Site Scripting (exploitdb)

## Other vulnerabilities in n/a

- [CVE-2006-2758](https://insights.sbomify.com/CVE-2006-2758/): Jetty Directory Traversal Vulnerability (medium 5.0)
- [CVE-2006-2759](https://insights.sbomify.com/CVE-2006-2759/): Improper Input Validation in Mortbay Jetty (medium 5.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2002-1533 and fix it if it is affected.

What it is: CVE-2002-1533 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Mar 2003. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2002-1533 exists.

Affected packages and fixed versions:
- org.mortbay.jetty:jetty (Maven): affected all versions; fixed in 4.1.1
- org.mortbay.jetty:jetty (Maven): affected all versions; fixed in 4.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2002-1533/ (Markdown: https://insights.sbomify.com/CVE-2002-1533/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2002-1533
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2002-1533
- OSV: https://osv.dev/vulnerability/CVE-2002-1533

---
From sbomify Insights: https://insights.sbomify.com/CVE-2002-1533/
Summaries are generated and may contain mistakes; the official description above is the record.
