# CVE-2004-2735: Cross-site scripting in n/a

> Remote attackers can inject arbitrary web script or HTML via multiple parameters in P4DB web interface, potentially stealing user data or executing code.

- **Severity:** Medium 4.3 (`AV:N/AC:M/Au:N/C:N/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:** No
- **Published:** 9 Oct 2007
- **Updated:** 8 Aug 2024
- **Also known as:** GHSA-hg8p-7r5h-9pfp

## What is CVE-2004-2735?

CVE-2004-2735 is a medium-severity cross-site scripting vulnerability in n/a, published on 9 Oct 2007. 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 P4DB 2.01 and earlier allows remote attackers to inject arbitrary web script or HTML via (1) SET_PREFERENCES parameter in SetPreferences.cgi; (2) BRANCH parameter in branchView.cgi; (3) FSPC and (4) COMPLETE parameters in changeByUsers.cgi; (5) FSPC, (6) LABEL, (7) EXLABEL, (8) STATUS, (9) MAXCH, (10) FIRSTCH, (11) CHOFFSETDISP, (12) SEARCHDESC, (13) SEARCH_INVERT, (14) USER, (15) GROUP, and (16) CLIENT parameters in changeList.cgi; (17) CH parameter in changeView.cgi; (18) USER parameter in clientList.cgi; (19) CLIENT parameter in clientView.cgi; (20) FSPC parameter in depotTreeBrowser.cgi; (21) FSPC parameter in depotStats.cgi; (22) FSPC, (23) REV, (24) ACT, (25) FSPC2, (26) REV2, (27) CH, and (28) CONTEXT parameters in fileDiffView.cgi; (29) FSPC and (30) REV parameters in fileDownLoad.cgi; (31) FSPC, (32) LISTLAB, and (33) SHOWBRANCH parameters in fileLogView.cgi; (34) FSPC and (35) LABEL parameters in fileSearch.cgi; (36) FSPC, (37) REV, and (38) FORCE parameters in fileViewer.cgi; (39) FSPC parameter in filesChangedSince.cgi; (40) GROUP parameter in groupView.cgi; (41) TYPE, (42) FSPC, and (43) REV parameters in htmlFileView.cgi; (44) CMD parameter in javaDataView.cgi; (45) JOBVIEW and (46) FLD parameters in jobList.cgi; (47) JOB parameter in jobView.cgi; (48) LABEL1 and (49) LABEL2 parameters in labelDiffView.cgi; (50) LABEL parameter in labelView.cgi; (51) FSPC parameter in searchPattern.cgi; (52) TYPE, (53) FSPC, and (54) REV parameters in specialFileView.cgi; (55) GROUPSONLY parameter in userList.cgi; or (56) USER parameter in userView.cgi.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2004-2735?

It affects 1 product.


Products: Fredric Fredricson P4db.

## How do I fix CVE-2004-2735?

No fix has been published for CVE-2004-2735 yet. Limit exposure of the affected software until one is available.

## Is CVE-2004-2735 being exploited?

There is no known exploitation of CVE-2004-2735 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2004-2735 and fix it if it is affected.

What it is: CVE-2004-2735 is a medium-severity cross-site scripting vulnerability in n/a, published on 9 Oct 2007. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2004-2735 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2004-2735/ (Markdown: https://insights.sbomify.com/CVE-2004-2735/index.md)
```

## Sources

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

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