# GHSA-8c8c-4vfj-rrpc: Reflected Cross-Site Scripting in redis-commander

> Reflected XSS in redis-commander allows attackers to execute scripts if Flash is enabled, requiring user interaction via a crafted link.

- **Severity:** Not scored
- **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:** 1 Sep 2020

## What is GHSA-8c8c-4vfj-rrpc?

GHSA-8c8c-4vfj-rrpc is a cross-site scripting vulnerability in redis-commander, published on 1 Sep 2020. 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

Affected versions of `redis-commander` contain a cross-site scripting vulnerability in the `highlighterId` paramter of the clipboard.swf component on hosts serving Redis Commander.

Mitigating factors:
Flash must be installed / enabled for this to work. The below proof of concept was verified to work using Firefox 57.0 on Windows 10 by manually installing the [Flash NPAPI Windows plugin](https://get.adobe.com/flashplayer/otherversions/)

## Proof of concept

```
http://instance/jstree/_docs/syntax/clipboard.swf?highlighterId=\%22))}%20catch(e)%20{alert(document.domain);}//
```

## Recommendation

No direct patch for this vulnerability is currently available.

At this time, the best mitigation is to use an alternative, functionally equivalent package, or to use extreme caution when using redis-commander, ensuring that redis-commmander is the only web page you have open, and avoiding clicking on any links.

## Which versions are affected by GHSA-8c8c-4vfj-rrpc?

2 open source packages ship an affected version, including redis-commander.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `redis-commander` | npm | From 0.0.0 | 0.5.0 |
| `redis-commander` | npm | From 0.0.0 | 0.5.0 |

## How do I fix GHSA-8c8c-4vfj-rrpc?

Upgrade redis-commander to 0.5.0 or later.

## Is GHSA-8c8c-4vfj-rrpc being exploited?

There is no known exploitation of GHSA-8c8c-4vfj-rrpc in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-8c8c-4vfj-rrpc and fix it if it is affected.

What it is: GHSA-8c8c-4vfj-rrpc is a cross-site scripting vulnerability in redis-commander, published on 1 Sep 2020. 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 GHSA-8c8c-4vfj-rrpc in the wild and no public exploit code.

Affected packages and fixed versions:
- redis-commander (npm): affected from 0.0.0; fixed in 0.5.0
- redis-commander (npm): affected from 0.0.0; fixed in 0.5.0

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/GHSA-8c8c-4vfj-rrpc/ (Markdown: https://insights.sbomify.com/GHSA-8c8c-4vfj-rrpc/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-8c8c-4vfj-rrpc

---
From sbomify Insights: https://insights.sbomify.com/GHSA-8c8c-4vfj-rrpc/
Summaries are generated and may contain mistakes; the official description above is the record.
