CVE-2021-20373

7.5 HIGH

📋 TL;DR

IBM Db2's LOAD utility fails to properly enforce directory restrictions under certain circumstances, allowing unauthorized access to sensitive files. This information disclosure vulnerability affects Db2 versions 9.7, 10.1, 10.5, 11.1, and 11.5 when using the LOAD utility.

💻 Affected Systems

Products:
  • IBM Db2
Versions: 9.7, 10.1, 10.5, 11.1, 11.5
Operating Systems: All platforms running affected Db2 versions
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability only manifests when using the LOAD utility. Systems not using LOAD or with restricted LOAD access are less exposed.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could exfiltrate sensitive database files, configuration files, or other system files containing credentials, personal data, or proprietary information.

🟠

Likely Case

Unauthorized users with LOAD utility access could read files outside permitted directories, potentially accessing sensitive data they shouldn't have permission to view.

🟢

If Mitigated

With proper access controls and monitoring, impact is limited to authorized users who might accidentally access restricted files.

🌐 Internet-Facing: MEDIUM - While the LOAD utility typically requires database access, internet-facing Db2 instances with exposed administrative interfaces could be vulnerable.
🏢 Internal Only: HIGH - Internal users with LOAD utility privileges could exploit this to access sensitive files they shouldn't have permission to view.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires LOAD utility access. No public exploit code has been identified, but the vulnerability is well-documented in advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Apply fixes as specified in IBM advisory APAR IT35980

Vendor Advisory: https://www.ibm.com/support/pages/node/6523804

Restart Required: Yes

Instructions:

1. Review IBM advisory APAR IT35980. 2. Apply the appropriate fix pack for your Db2 version. 3. Restart Db2 services. 4. Verify the fix by testing LOAD utility directory restrictions.

🔧 Temporary Workarounds

Restrict LOAD Utility Access

all

Limit which users and applications can execute the LOAD utility to only those with legitimate business need.

-- Use Db2 authorization controls to restrict LOAD privilege
GRANT LOAD ON DATABASE TO authorized_users_only;
-- Review and revoke unnecessary LOAD privileges

Implement File System Controls

linux

Use operating system file permissions to restrict access to sensitive directories outside Db2's permitted paths.

# Linux example: Restrict directory permissions
chmod 750 /sensitive/directories
chown db2inst1:db2iadm1 /db2/data/directories

🧯 If You Can't Patch

  • Implement strict access controls on LOAD utility usage and monitor for unauthorized LOAD operations
  • Use file system auditing to detect attempts to access files outside permitted LOAD directories

🔍 How to Verify

Check if Vulnerable:

Check if your Db2 version is 9.7, 10.1, 10.5, 11.1, or 11.5 and if LOAD utility is used in your environment.

Check Version:

db2level | grep "Product installed"

Verify Fix Applied:

After applying patches, test LOAD utility with attempts to access files outside permitted directories to confirm restrictions are enforced.

📡 Detection & Monitoring

Log Indicators:

  • Unusual LOAD utility activity
  • Failed LOAD operations with path traversal attempts
  • Access to files outside expected LOAD directories

Network Indicators:

  • Unusual database administrative traffic patterns

SIEM Query:

source="db2*" AND (event="LOAD" OR command="LOAD") AND (path="*../*" OR error="permission denied")

🔗 References

📤 Share & Export