CVE-2023-28158: Apache Archiva Privilege Escalation via Stored Cross-Site Scripting (XSS)

org.apache.archiva:archiva Updated 02 Oct 2025

Summary

29/03/2023
Yes i
Moderate
6.5

CVE-2023-28158: Apache Archiva vulnerable to privilege escalation via stored cross-site scripting (XSS). Affects org.apache.archiva:archiva versions >= 2.0.0, < 2.2.10. Fixed in 2.2.10. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Archiva is a Maven-based repository management tool used for storing and distributing build artifacts. It provides features such as artifact uploading, searching, and dependency management. The vulnerability identified as CVE-2023-28158 allows authenticated users to exploit a stored cross-site scripting (XSS) vulnerability by uploading malicious content through the file upload service. This vulnerability enables attackers to inject XSS content into directory names, potentially leading to privilege escalation and unauthorized access, including administrative privileges.

Vulnerability Detail

The vulnerability in Apache Archiva arises from a lack of input validation and sanitization when processing user-supplied directory names during file uploads. By crafting a malicious directory name containing XSS payloads, authenticated users can inject arbitrary JavaScript code into the application. When other users, including administrators, access the affected pages, the injected code executes within their browsers, leading to various consequences such as session hijacking, defacement, or data theft. The impact of this vulnerability is considered moderate, with a CVSS score of 6.5.

How To Fix

Minimum fixed version

2.2.10

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can disable the file upload service in Apache Archiva until the upgrade to a patched version is feasible. This can be achieved by modifying the application's configuration to remove or restrict access to the file upload functionality. However, this workaround may limit the functionality of the repository management tool and should only be considered as a short-term solution.

Conclusion

The vulnerability in Apache Archiva allows authenticated users to exploit a stored cross-site scripting vulnerability, potentially leading to privilege escalation and unauthorized access. To mitigate this risk, it is recommended to upgrade to Apache Archiva version 2.2.10 or later. Alternatively, users can temporarily disable the file upload service until the upgrade is performed. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for org.apache.archiva:archiva →

Share this vulnerability

FAQ

This vulnerability affects users of Apache Archiva versions 2.0.0 to 2.2.9. Only authenticated users with the ability to upload files are capable of exploiting this vulnerability.

The impact of this vulnerability can vary depending on the privileges of the targeted user. If an administrator falls victim to the XSS attack, an attacker could gain full control over the Apache Archiva instance, potentially leading to unauthorized access, data manipulation, or further compromise of the underlying system.

At the time of this advisory, there are no known instances of this vulnerability being actively exploited in the wild. However, it is crucial to apply the recommended patches or workarounds promptly to mitigate the risk of exploitation.

Yes, the CVSS score for this vulnerability is 6.5, indicating a moderate level of severity. It is important to address this vulnerability promptly to prevent potential privilege escalation attacks.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.archiva:archiva.

How To Fix

Minimum fixed version

2.2.10

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback