CVE-2021-31863

7.5 HIGH

📋 TL;DR

This vulnerability allows authenticated Redmine users to read arbitrary local files accessible by the application server process due to insufficient input validation in Git repository integration. It affects Redmine installations before version 4.0.9, 4.1.x before 4.1.3, and 4.2.x before 4.2.1. Attackers can exploit this to access sensitive files like configuration files, credentials, or other data stored on the server.

💻 Affected Systems

Products:
  • Redmine
Versions: Redmine before 4.0.9, 4.1.x before 4.1.3, 4.2.x before 4.2.1
Operating Systems: All operating systems running Redmine
Default Config Vulnerable: ⚠️ Yes
Notes: Requires Git repository integration feature to be enabled and user authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain access to sensitive system files, configuration files containing credentials, SSH keys, database passwords, or other proprietary data, potentially leading to full system compromise.

🟠

Likely Case

Authenticated users read configuration files, source code, or other sensitive files stored on the server, leading to information disclosure and potential credential theft.

🟢

If Mitigated

Limited to reading files accessible by the Redmine application server user, with proper file permissions preventing access to critical system files.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated user access. Public proof-of-concept code exists demonstrating file reading.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Redmine 4.0.9, 4.1.3, 4.2.1 or later

Vendor Advisory: https://www.redmine.org/projects/redmine/wiki/Security_Advisories

Restart Required: Yes

Instructions:

1. Backup your Redmine installation and database. 2. Download the patched version from redmine.org. 3. Follow the Redmine upgrade instructions for your version. 4. Restart the application server.

🔧 Temporary Workarounds

Disable Git Repository Integration

all

Temporarily disable the vulnerable Git repository integration feature

Edit Redmine configuration to disable repository features or remove repository settings

Restrict File Permissions

linux

Limit file system permissions for the Redmine application server user

chmod 600 /path/to/sensitive/files
chown root:root /path/to/sensitive/files

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Redmine servers
  • Apply additional authentication controls and monitor for suspicious file access patterns

🔍 How to Verify

Check if Vulnerable:

Check Redmine version via admin interface or by examining the application files

Check Version:

Check Redmine version in Admin → Information or examine VERSION file in installation directory

Verify Fix Applied:

Verify Redmine version is 4.0.9, 4.1.3, 4.2.1 or later and test Git repository functionality

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns in application logs
  • Multiple failed or unusual Git repository operations

Network Indicators:

  • Unusual outbound connections from Redmine server

SIEM Query:

source="redmine.log" AND ("repository" OR "git") AND ("error" OR "access" OR "permission")

🔗 References

📤 Share & Export