# CVE-2024-21678: Cross-site scripting in Confluence Data Center

> Authenticated attackers can inject malicious scripts into Confluence Data Center, allowing arbitrary code execution in victim browsers.

- **Severity:** High 8.5 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A: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:** 20 Feb 2024
- **Updated:** 31 Oct 2024
- **Also known as:** GHSA-hvfx-qp2c-x42h

## What is CVE-2024-21678?

CVE-2024-21678 is a high-severity cross-site scripting vulnerability in Atlassian Confluence Data Center, published on 20 Feb 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

This High severity Stored XSS vulnerability was introduced in version 2.7.0 of Confluence Data Center.

This Stored XSS vulnerability, with a CVSS Score of 8.5, allows an authenticated attacker to execute arbitrary HTML or JavaScript code on a victims browser which has high impact to confidentiality, low impact to integrity, no impact to availability, and requires no user interaction.
Data Center

Atlassian recommends that Confluence Data Center customers upgrade to the latest version. If you are unable to do so, upgrade your instance to one of the specified supported fixed versions:
||Affected versions||Fixed versions||
|from 8.7.0 to 8.7.1|8.8.0 recommended or 8.7.2|
|from 8.6.0 to 8.6.1|8.8.0 recommended|
|from 8.5.0 to 8.5.4 LTS|8.8.0 recommended or 8.5.5 LTS or 8.5.6 LTS|
|from 8.4.0 to 8.4.5|8.8.0 recommended or 8.5.6 LTS|
|from 8.3.0 to 8.3.4|8.8.0 recommended or 8.5.6 LTS|
|from 8.2.0 to 8.2.3|8.8.0 recommended or 8.5.6 LTS|
|from 8.1.0 to 8.1.4|8.8.0 recommended or 8.5.6 LTS|
|from 8.0.0 to 8.0.4|8.8.0 recommended or 8.5.6 LTS|
|from 7.20.0 to 7.20.3|8.8.0 recommended or 8.5.6 LTS|
|from 7.19.0 to 7.19.17 LTS|8.8.0 recommended or 8.5.6 LTS or 7.19.18 LTS or 7.19.19 LTS|
|from 7.18.0 to 7.18.3|8.8.0 recommended or 8.5.6 LTS or 7.19.19 LTS|
|from 7.17.0 to 7.17.5|8.8.0 recommended or 8.5.6 LTS or 7.19.19 LTS|
|Any earlier versions|8.8.0 recommended or 8.5.6 LTS or 7.19.19 LTS|
Server

Atlassian recommends that Confluence Server customers upgrade to the latest 8.5.x LTS version. If you are unable to do so, upgrade your instance to one of the specified supported fixed versions:

 
||Affected versions||Fixed versions||
|from 8.5.0 to 8.5.4 LTS|8.5.5 LTS or 8.5.6 LTS recommended |
|from 8.4.0 to 8.4.5|8.5.6 LTS recommended|
|from 8.3.0 to 8.3.4|8.5.6 LTS recommended|
|from 8.2.0 to 8.2.3|8.5.6 LTS recommended|
|from 8.1.0 to 8.1.4|8.5.6 LTS recommended|
|from 8.0.0 to 8.0.4|8.5.6 LTS recommended|
|from 7.20.0 to 7.20.3|8.5.6 LTS recommended|
|from 7.19.0 to 7.19.17 LTS|8.5.6 LTS recommended or 7.19.18 LTS or 7.19.19 LTS|
|from 7.18.0 to 7.18.3|8.5.6 LTS recommended or 7.19.19 LTS|
|from 7.17.0 to 7.17.5|8.5.6 LTS recommended or 7.19.19 LTS|
|Any earlier versions|8.5.6 LTS recommended or 7.19.19 LTS|

See the release notes ([https://confluence.atlassian.com/doc/confluence-release-notes-327.html]). You can download the latest version of Confluence Data Center from the download center ([https://www.atlassian.com/software/confluence/download-archives]).

This vulnerability was reported via our Bug Bounty program.

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

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

It affects 2 products.


Products: Atlassian Confluence Data Center, Atlassian Confluence Server.

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

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

## Is CVE-2024-21678 being exploited?

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

## Other vulnerabilities in Atlassian Confluence Data Center

- [CVE-2023-22527](https://insights.sbomify.com/CVE-2023-22527/): Atlassian Confluence Data Center and Server Template Injection (critical 10.0, exploited in the wild)
- [CVE-2023-22518](https://insights.sbomify.com/CVE-2023-22518/): Atlassian Confluence Data Center and Server Improper Authorization (critical 10.0, exploited in the wild)
- [CVE-2023-22515](https://insights.sbomify.com/CVE-2023-22515/): Atlassian Confluence Data Center and Server Broken Access Control (critical 10.0, exploited in the wild)
- [CVE-2022-26134](https://insights.sbomify.com/CVE-2022-26134/): Atlassian Confluence Server and Data Center Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2021-26084](https://insights.sbomify.com/CVE-2021-26084/): Atlassian Confluence Server and Data Center Object-Graph Navigation Language (OGNL) Injection (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-21678 is a high-severity cross-site scripting vulnerability in Atlassian Confluence Data Center, published on 20 Feb 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-21678 in the wild and no public exploit code.

Affected product: Atlassian Confluence Data Center. 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-21678/ (Markdown: https://insights.sbomify.com/CVE-2024-21678/index.md)
```

## Sources

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

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