Skip to main content
Vulnerability Database/CVE-2024-22346

CVE-2024-22346: IBM i Db2 Privilege Escalation Vulnerability

CVE-2024-22346 is a privilege escalation vulnerability in Db2 for IBM i that allows local users to gain elevated privileges through an unqualified library call. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-22346 Overview

CVE-2024-22346 is a local privilege escalation vulnerability affecting Db2 for IBM i versions 7.2, 7.3, 7.4, and 7.5. The flaw stems from an unqualified library call within the Db2 infrastructure. A local authenticated user can exploit this weakness to execute user-controlled code with administrator privileges. IBM tracks this issue internally as X-Force ID 280203 and classifies it under CWE-427: Uncontrolled Search Path Element. The vulnerability requires low privileges and no user interaction, making exploitation straightforward for any user with local access to a vulnerable IBM i system.

Critical Impact

An authenticated local user can escalate to administrator privileges, obtaining full confidentiality, integrity, and availability impact on affected IBM i systems.

Affected Products

  • IBM i 7.2
  • IBM i 7.3
  • IBM i 7.4 and 7.5

Discovery Timeline

  • 2024-03-14 - CVE-2024-22346 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-22346

Vulnerability Analysis

The vulnerability resides in the Db2 for IBM i infrastructure, where a program issues an unqualified library call. When IBM i programs call objects without specifying a library name, the system searches the user's library list to locate the target object. This behavior creates a predictable search order that an attacker can manipulate.

A local attacker with permission to create objects in a library earlier in the search path can place a malicious program with the same name as the expected target. When the privileged Db2 process issues the unqualified call, the system resolves it to the attacker-controlled object. The malicious code then executes within the security context of the Db2 infrastructure, which runs with administrator authority on IBM i.

The weakness aligns with CWE-427: Uncontrolled Search Path Element, analogous to DLL search order hijacking on Windows systems.

Root Cause

IBM i programs can reference called objects using either a qualified name (LIBRARY/OBJECT) or an unqualified name (OBJECT). Unqualified calls rely on the job's library list for resolution. When a program running under elevated authority performs an unqualified call, any user who can influence the library list or inject objects into earlier libraries can hijack the call path.

Attack Vector

Exploitation requires local access and valid credentials on the IBM i system. The attacker must have authority to create program objects in a library that appears in the library list before the intended target library. Once the malicious object is in place, routine execution of the vulnerable Db2 code path triggers the attacker's payload with administrator privileges. No user interaction is required.

Technical details on IBM i library search behavior are available in the IBM X-Force advisory for X-Force ID 280203 and the IBM Support Advisory #7140499.

Detection Methods for CVE-2024-22346

Indicators of Compromise

  • Unexpected program or service program objects created in libraries that appear early in system library lists (QSYS, QSYS2, QUSRSYS, or user libraries preceding IBM libraries).
  • Audit journal entries (QAUDJRN) showing object creation (CO) or authority changes (CA) on objects whose names match internal Db2 routines.
  • Jobs running under Db2 service profiles invoking programs from non-IBM libraries.

Detection Strategies

  • Enable IBM i object auditing (CHGOBJAUD) on Db2-related libraries and monitor for new program objects.
  • Review the system value QAUDLVL to ensure *CREATE, *OBJMGT, and *PGMFAIL auditing is active.
  • Compare current library list configurations against a known-good baseline to detect unauthorized library insertions.

Monitoring Recommendations

  • Forward QAUDJRN entries to a centralized SIEM for correlation with privilege escalation patterns.
  • Alert on executions of programs under Db2 server jobs that originate from user libraries rather than QSYS or QSYS2.
  • Track adopted authority usage (*USRPRF adoption) across Db2 subsystem jobs for anomalies.

How to Mitigate CVE-2024-22346

Immediate Actions Required

  • Apply the IBM-provided PTF (Program Temporary Fix) referenced in IBM Support Advisory #7140499 for your installed release of IBM i.
  • Audit user library lists and remove unnecessary user libraries that precede IBM system libraries.
  • Restrict *CHANGE and *OBJMGT authority on libraries that are part of the system library search path.

Patch Information

IBM has released fixes addressed through standard IBM i Group PTF channels for releases 7.2, 7.3, 7.4, and 7.5. Administrators should review the IBM Support Advisory #7140499 for the specific PTF numbers applicable to their release and apply them through standard PTF management procedures.

Workarounds

  • Reduce the number of users with authority to create objects in libraries referenced by the system or Db2 library list.
  • Enforce least-privilege user profiles and remove *ALLOBJ special authority from users who do not require it.
  • Monitor adopted-authority programs and validate library list contents before invoking privileged Db2 operations.
bash
# IBM i CL commands to review and tighten library authorities
DSPLIBL
DSPOBJAUT OBJ(QSYS/QSYS2) OBJTYPE(*LIB)
CHGOBJAUD OBJ(QSYS/QSYS2) OBJTYPE(*LIB) OBJAUD(*ALL)
WRKSYSVAL SYSVAL(QAUDLVL)

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.