CVE-2021-40525: Path Traversal in Apache James

Summary

21/01/2022
Yes i
Critical
9.1

CVE-2021-40525: Path traversal in Apache James. Affects org.apache.james:james-server versions < 3.6.1. Fixed in 3.6.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Apache James is an open-source email server that provides a complete implementation of the SMTP, POP3, and IMAP protocols. It offers various features for managing and organizing email messages. The ManagedSieve component in Apache James is responsible for handling Sieve scripts, which are used for email filtering and processing. The file storage mechanism used for storing these scripts is vulnerable to path traversal, allowing an attacker to read and write arbitrary files on the server. This vulnerability has been assigned the CVE identifier CVE-2021-40525.

Vulnerability Detail

The path traversal vulnerability in Apache James allows an attacker to bypass the intended file access restrictions and access files outside the designated directory. By manipulating the file path in the request, an attacker can read sensitive files containing confidential information or modify critical system files, leading to unauthorized access, data leakage, or even remote code execution. This vulnerability has a CVSS score of 9.1, indicating a critical severity level.

How To Fix

Latest published version: 3.9.1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.6.1

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 implement access controls at the operating system level to restrict the permissions of the Apache James process. By configuring appropriate file system permissions, it is possible to limit the impact of a potential path traversal attack. However, this workaround is not a comprehensive solution and should be considered temporary until the upgrade to a patched version can be performed.

Conclusion

The path traversal vulnerability in Apache James can be mitigated by upgrading to the latest patched version. It is crucial to promptly apply the necessary updates to ensure the security and integrity of the email server. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.james:james-server →

Share this vulnerability

FAQ

Apache James is an open-source email server that provides SMTP, POP3, and IMAP functionality.

A path traversal vulnerability allows an attacker to access files outside the intended directory by manipulating file paths in requests.

This vulnerability allows an attacker to read and write arbitrary files on the server, potentially leading to unauthorized access, data leakage, or remote code execution.

To fix this vulnerability, upgrade to Apache James version 3.6.1 or higher.

As a temporary workaround, implement access controls at the operating system level to restrict Apache James' permissions.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.james:james-server.

How To Fix

Latest published version: 3.9.1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.6.1

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