IBM i Object Ownership Chains: A Hidden Privilege Escalation Risk

IBM i security discussions usually focus on special authorities, exit programs, and object-level permissions. Very few discussions go deep into object ownership chains, even though they can silently bypass carefully designed authority models.

Ownership chains exist by design. They simplify application execution. But in real environments—especially legacy-heavy systems—they create unintended privilege escalation paths that remain invisible to audits and daily operations.

This post explains how ownership chains work, why they are dangerous, how attackers exploit them, and how to detect and control them using native IBM i commands.

This is not theory. These risks exist in production systems today.

Table of Contents

What Is an Object Ownership Chain ?

On IBM i, every object has:

When a program runs, IBM i evaluates authority in this order:

  1. User profile authority
  2. Group profile authority
  3. Adopted authority (program owner or *USEADPAUT)
  4. Object owner authority

If a program adopts authority, IBM i temporarily adds the owner’s authority to the job only while that program runs.

That temporary authority can:

This is the core of an ownership chain.

These chains can create unintended pathways for privilege escalation, allowing low-privileged users to gain elevated access through a series of ownership links that bypass traditional object-level security.

Unlike straightforward authority grants, ownership chains operate quietly, leveraging the system’s adopted authority mechanism to propagate rights in ways that aren’t immediately obvious. This makes them a hidden risk that’s rarely covered in depth—most resources focus on direct authorities, leaving these chains as an overlooked vulnerability in many environments.

How Adopted Authority Really Works

To understand the risk, we have to look at Adopted Authority. In a standard setup, a program runs with the authority of the user who called it. However, IBM i allows a program to “adopt” the authority of its Owner.

At its core, adopted authority is a feature designed to let programs temporarily “adopt” the privileges of their owner, enabling users to perform tasks they wouldn’t otherwise have the rights to do. This is controlled by the USRPRF(*OWNER) parameter on program objects. When a program runs, it adds the owner’s authorities to the user’s existing ones, but only while the program is active in the call stack. Once it exits, those adopted rights vanish.

Objects That Can Adopt Authority

Let me explain this further.

  1. When a program uses the owner’s authority, it’s referred to as adopted authority.
adopted authority

  1. When you create a program, you specify a user profile (USRPRF) parameter on the CRTxxxPGM command (CRTCLPGM, CRTCBLPGM, CRTRPGPGM, etc) .
  2. This parameter indicates whether the program utilizes the authority of the program’s owner in addition to the authority of the user executing the program.
CRTCLPGM

  1. Any other authority found for the user is append by the adopted authority.
  2. It is checked only if the user lacks the necessary authority to perform the requested operation on an object.
  3. The special authorities (such as *ALLOBJ, *IOSYSCFG ,..) in the owner’s profile are used.
  4. The owner’s group authority or Public authority is not used for adopted authority.

For example, The system checks authorities in a stack: user rights first, then group rights, then adopted ones from the call stack. Public authorities are ignored for adoption, ensuring it’s strictly owner-based. if a user runs a program that requires *USE authority to a customer file, adopted authority allows the program to use the owner’s authority to modify the file while querying it with SQL.

How adopted authority works
How adopted authority works

Program DetailsObject OwnershipAuthoritiesResult
PGM
RUNQRY QRYFILE(CUSTMPF)
ENDPGM
Program GETSAL → Owned by APPOWNER

File CUSTMPF → Owned by APPOWNER
USER→ *USE authority to GETSAL

USER → *EXCLUDE authority to CUSTMPF
USER01 can run GETSAL and read/modify CUSTMPF.

No special authority.
No direct file access.
No audit warning.

Common real-world mistake

Any program owned by APPOWNER becomes a privilege bridge.

This mechanism is powerful for applications needing controlled access, like a payroll system where a clerk can view sensitive data only through a specific report program. However, if not implemented carefully, it can lead to escalation. Privileged scripts or programs that adopt authority without proper safeguards—such as monitoring the call stack or using features like Modify Invocation Authority Attributes (MODINVAU) to block further adoption—create risks. The authority remains active as long as the adopting program is in the stack, potentially allowing chained exploits if multiple programs are involved.

The Hidden Risk: If a powerful profile (like QSECOFR or a custom application owner with *ALLOBJ) owns a program that can be subverted or modified by a lower-level user, that user effectively inherits the keys to the kingdom.

Ownership Chain vs Adopted Authority

Ownership chains often get confused with adopted authority. They are related but not identical.

ConceptDescription
Adopted authorityProgram explicitly adopts owner’s authority
Ownership chainMultiple objects owned by the same profile allow access without explicit authority

Key point:

A user may access a restricted object without any direct authority if the ownership chain remains intact.

Why? Ownership chain. IBM i trusts the owner of the program and the file.

Why This Becomes a Privilege Escalation Risk

Ownership chains become dangerous when:

Real-World Misuse Scenarios

The “CALL PGM(QCMD)” Disaster Pattern

An administrator creates a utility program to help users perform a specific task. To make it work, the program is owned by a high-privilege profile and set to USRPRF(*OWNER). If that program has an “exit to command line” feature or allows a user to run a generic command (like QCMDEXC), the user can now execute any command with the owner’s full authority.

If this program:

Then the user gets a command line with adopted authority. This is not theoretical. This is one of the oldest IBM i escalation paths.

Another example, If a privileged program adopts authority but doesn’t sanitize inputs or control the execution flow, an attacker can chain calls to gain root-like access. For example, SQL services flaws have allowed authenticated users to execute procedures under another profile’s privileges, chaining to OS root access. These aren’t hypothetical—reports from ethical hackers show how improper implementation of adopted authority in privileged scripts leads to full system compromise.

The Developmental “Trojan Horse”

In many shops, developers own the objects in a test library. If a developer creates a program, sets it to adopt authority, and then a systems administrator moves that program into production without changing the owner to a restricted profile, the developer (or anyone who can modify that developer’s test objects) has created a back door into the production environment.

Hidden Ownership Chains Across Libraries

Ownership chains do not stop at one object.

Remote commands

In another real-world case, remote commands from external sources like Windows CMD or DB2 Connect can create profiles with special authorities, owned by unexpected users. This bypasses authentication (CVE-2023-30990) and creates ownership chains where the new profile inherits elevated rights, enabling further escalation. Vulnerable systems often end up with multiple privately authorized profiles that chain together, allowing low-priv users to “hijack” higher ones.

Library List

One common scenario involves library list (LIBL) abuse (CVE-2025-36004): attackers manipulate the library search path to inject malicious objects owned by privileged profiles, leading to privilege escalation. Even with profile swapping mitigations in place, LIBL vulnerabilities can still allow an attacker to chain ownerships for unauthorized access.

Why Audits Miss This

Traditional audits focus on User Profiles and Object Private Authorities. An auditor might look at a sensitive payroll file and see that only three people have access. They check the box and move on.

The Blind Spot: They aren’t looking at the Ownership Chain of the programs that touch that file.

In essence, without probing ownership hierarchies and adoption flows, auditors see only the tip of the iceberg.

Ownership chains do not appear in:

Practical Ways to Detect Risky Ownership Chains

Securing your system requires moving beyond simple authority checks. You need to map the relationship between owners and programs. Detecting these chains requires proactive tools and practices.

Start with the Audit Journal: Enable auditing for ownership changes and use SQL queries to analyze entries, identifying unauthorized shifts and reverting them if needed.

Step 1: Find Programs That Adopt Authority and Check Program Owners

Step 2: Check Owner’s Special Authorities

Step 3: Identify Files Accessed by Adopted Programs

Step 4: Detecting Cross-Library Ownership Abuse

Step 5: Monitor File Access

IBM i Object Ownership Chains
a sample call stack (src: IBM)

Step 6: Monitor the “Change” History

Step 7: Review IFS for Accessed Files

Note: Adopted authority is not supported by the Integrated File System.

How to Break Dangerous Ownership Chains (Safely)

Strategy 1: Separate Owners by Function

  1. Create a dedicated owner profile: Create a new, non-interactive user profile with minimal authorities (e.g., no *ALLOBJ special authority and no command line access) to act as the owner of the application’s objects.
    • Application programs → APP_PGM_OWN
    • Data files → APP_DATA_OWN
    • System utilities → SYS_OWN
  2. Never reuse powerful profiles
  3. Transfer ownership: 
    • Use the Change Object Owner (CHGOBJOWN) ,Change Owner (CHGOWN) commands to transfer ownership of the objects from the current owner (e.g., QSECOFR) to the new, restricted owner profile.
      • Safely transfer authority: The default for the CUROWNAUT parameter is *REVOKE, which automatically removes the previous owner’s authority to the object. Ensure this parameter is used to prevent the former owner from retaining unnecessary access.
    • Use Change Program (CHGPGM) and/or Change Service Program (CHGSRVPGM) commands to change the owners.

Strategy 2: Minimize adopted authority

If a program truly needs elevated access: Grant object-level authority, Avoid blanket special authorities

Strategy 3: Eliminate Dynamic Command Execution

Avoid: CALL QCMD
use:

Fully qualify calls: Ensure all sensitive calls to programs, commands, and files are fully qualified with their library names (never rely solely on *LIBL). This prevents library list manipulation, a common vector for privilege escalation attacks.

Strategy 4: Monitor Adopted Authority Usage

Regularly audit object ownership and permissions to ensure compliance with the new security template and check for any deviations. Commercial tools can help in comparing current settings against a predefined security template. 

Enable auditing above options and Then correlate:

Ownership Chains vs Zero Trust Thinking

Ownership chains assume:

“If you trust the program owner, you trust everything it touches.”

That assumption no longer holds in:

IBM i does not enforce Zero Trust. You must design it.

Final Thoughts

Object ownership isn’t just about who “owns” a file; it’s about the invisible permissions that flow through your application stack. Ownership chains are not a vulnerability. They are a powerful feature. But unmanaged ownership chains turn IBM i into:

If you secure IBM i seriously, you must understand who owns what—and why. By auditing your ownership chains and strictly controlling who can create programs that adopt authority, you close a loophole that many hackers—and even some auditors—rely on staying open.

Here are relevant, credible references to support the key points in the blog post on IBM i Object Ownership Chains: A Hidden Privilege Escalation Risk. I’ve grouped them by the main sections for easy mapping, with direct links and brief descriptions of how they relate.

How Adopted Authority Really Works Under the Hood

  1. IBM Official Documentation: Adopted Authority https://www.ibm.com/support/pages/adopted-authority
  2. IBM i Security Reference https://www.ibm.com/docs/en/ssw_ibm_i_74/rzarl/sc415302.pdf
  3. IBM i: Use Adopted Authority System Value (QUSEADPAUT) https://www.ibm.com/docs/en/i/7.4?topic=values-use-adopted-authority-quseadpaut
  4. Silent Signal Techblog: Abusing Adopted Authority on IBM i https://blog.silentsignal.eu/2023/01/20/abusing-adopted-authority-on-ibm-i
  5. Silent Signal Techblog: IBM i LIBL Autopwn – Kill the Vulnerability Class (2025) https://blog.silentsignal.eu/2025/10/22/IBM-i-LIBL-Autopwn-Kill-the-Vulnerability-Class
  6. IBM Security Bulletin: Privilege Escalation in IBM i SQL Services (CVE-2025-36367) https://www.ibm.com/support/pages/security-bulletin-ibm-i-affected-privilege-escalation-ibm-i-sql-services-cve-2025-36367
  7. LinkedIn Article: IBM i Security Vulnerable to Privilege Escalation https://www.linkedin.com/pulse/your-ibm-i-iseriesas400-security-vulnerable-privilege-bob-losey
  8. Precisely: Best Practices for Managing Elevated IBM i Authorities (Part 2) https://www.precisely.com/data-security/best-practices-managing-elevated-ibm-i-authorities-part-2
  9. Fortra: How IBM i Determines a User’s Authority to Access Objects https://www.fortra.com/blog/how-ibm-i-determines-user-authority-access-objects
  10. IT Jungle: Guru – IBM i Privileged Account Management https://www.itjungle.com/2022/08/01/guru-ibm-i-privileged-account-management-and-whats-so-special-about-special-authorities
  11. IBM i Documentation: Object Ownership https://www.ibm.com/docs/en/i/7.5.0?topic=security-object-ownership