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.
On IBM i, every object has:
When a program runs, IBM i evaluates authority in this order:
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.
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.

CRTxxxPGM command (CRTCLPGM, CRTCBLPGM, CRTRPGPGM, etc) . 
*ALLOBJ, *IOSYSCFG ,..) in the owner’s profile are used.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.

| Program Details | Object Ownership | Authorities | Result |
|---|---|---|---|
PGM | 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. |
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 chains often get confused with adopted authority. They are related but not identical.
| Concept | Description |
|---|---|
| Adopted authority | Program explicitly adopts owner’s authority |
| Ownership chain | Multiple objects owned by the same profile allow access without explicit authority |
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.
Ownership chains become dangerous when:
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.
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.
Ownership chains do not stop at one object.
If: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.
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.
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.
CHGPGM (Change Program) or CRTXXXPGM commands to see who has the right to create objects that adopt authority.In essence, without probing ownership hierarchies and adoption flows, auditors see only the tip of the iceberg.
Ownership chains do not appear in:
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.
DSPPGM PGM(MYLIB/*ALL) DETAIL(*BASIC)
Use adopted authority . . . . . : *YES
USRPRF(*OWNER) Attribute – Your first step is identifying every program on the system that adopts authority. You can use the DSPPGMADP (Display Program Adopt) command or query the system metadata:
-- SQL to find programs that adopt owner authority
SELECT * FROM QSYS2.PROGRAM_INFO
WHERE USER_PROFILE = '*OWNER'
AND USE_ADOPTED_AUTHORITY ='*YES';
*ALLOBJ, *SECADM, or *SERVICE. These are your highest-risk objects.

DSPPGMREF PGM(MYLIB/GETSAL)
OUTFILE) for easier analysis.. The following list shows the system objects provided for the respective program types such as CLP, CLE, CLLE, QRYDFN, RPGLE, etc. DSPOBJD OBJ(MYLIB/*ALL) OBJTYPE(*PGM)DSPOBJD OBJ(OTHERLIB/*ALL) OBJTYPE(*FILE)
QAUDJRN) to look specific entries on programs that adopt authority. If a program adopts QSECOFR authority and was recently changed by a non-security user, that is a massive red flag.DSPJRN JRN(QSYS/QAUDJRN) RCVRNG(*CURCHAIN) ENTTYP(XX) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE5) OUTFILE(QTEMP/OBJAUDIT)
AF,AP,PA,DO,PG,PS, etc.QTEMP/OBJAUDIT file to identify users, timestamps, and files accessed. Note: Adopted authority is not supported by the Integrated File System.
DSPJRN to output data to a file for analysis.
QTEMP/IFSAUDIT file to identify users, timestamps, and files accessed. APP_PGM_OWNAPP_DATA_OWNSYS_OWNCUROWNAUT 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.If a program truly needs elevated access: Grant object-level authority, Avoid blanket special authorities
USRPRF(*USER)) whenever possible.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.
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 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.
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.