# CVE-2024-47781: Cross-site Scripting (XSS) in Special:RequestWikiQueue when displaying sitename in CreateWiki

> Attackers can inject scripts via wiki names to steal session data and view private requests in the CreateWiki extension.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 7 Oct 2024
- **Updated:** 8 Oct 2024
- **Also known as:** GHSA-h527-jh77-5g7j

## What is CVE-2024-47781?

CVE-2024-47781 is a medium-severity cross-site scripting vulnerability in miraheze CreateWiki, published on 7 Oct 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

CreateWiki is an extension used at Miraheze for requesting & creating wikis. The name of requested wikis is not escaped on Special:RequestWikiQueue, so a user can insert arbitrary HTML that is displayed in the request wiki queue when requesting a wiki. If a wiki creator comes across the XSS payload, their user session can be abused to retrieve deleted wiki requests, which typically contains private information. Likewise, this can also be abused on those with the ability to suppress requests to view sensitive information. This issue has been patched with commit `693a220` and all users are advised to apply the patch. Users unable to upgrade should disable Javascript and/or prevent access to the vulnerable page (Special:RequestWikiQueue).

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

## Which versions are affected by CVE-2024-47781?

It affects 1 product.


Products: Miraheze Createwiki.

## How do I fix CVE-2024-47781?

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

## Is CVE-2024-47781 being exploited?

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

## Other vulnerabilities in miraheze CreateWiki

- [CVE-2022-24813](https://insights.sbomify.com/CVE-2022-24813/): Authentication Bypass Using an Alternate Path or Channel in CreateWiki (medium 5.3)
- [CVE-2024-29898](https://insights.sbomify.com/CVE-2024-29898/): Oversight in fix for GHSA-4rcf-3cj2-46mq may have exposed suppressed wiki requests on private wikis (medium 4.9)
- [CVE-2024-29883](https://insights.sbomify.com/CVE-2024-29883/): CreateWiki's wiki request suppression ignores the suppression settings set by the suppressor (medium 4.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-47781 and fix it if it is affected.

What it is: CVE-2024-47781 is a medium-severity cross-site scripting vulnerability in miraheze CreateWiki, published on 7 Oct 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-47781 in the wild and no public exploit code.

Affected product: miraheze CreateWiki. 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-2024-47781/ (Markdown: https://insights.sbomify.com/CVE-2024-47781/index.md)
```

## Sources

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

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