Safeguard
Application Security•

CWE-268 Privilege Chaining: When Two Safe Rights Add Up to Admin

CWE-268 describes two harmless looking privileges that together allow an unsafe action. Learn how to find combinations before an attacker does.

Safeguard Security Team
2 min read

CWE-268, Privilege Chaining, happens when two distinct privileges, roles, capabilities, or rights can be combined to let an entity do something it would not be allowed to do with either one alone.

Access reviews usually check rights one at a time. Chaining lives in the gaps between them.

How it happens

Each right is fine in isolation. Together they open a path. A common shape: one right lets you write to a place, another causes a privileged process to read from it.

MITRE's observed examples:

  • CVE-2005-1736 (Gold): chaining of user rights.
  • CVE-2002-1772 (Gold): gaining certain rights via privilege chaining in an alternate channel.
  • CVE-2005-1973 (Gold): an application is allowed to assign extra permissions to itself.
  • CVE-2003-0640 (Gold): an "operator" user can overwrite usernames and passwords to gain admin privileges.

The last one is easy to picture. The operator role is not admin. But it can edit credentials, and credentials are admin.

What an attacker gains

MITRE lists gaining privileges or assuming identity. A user can acquire the access rights of another user, including access information such as credentials.

How to find it

  • Ask, for each role: can it modify anything that another, more powerful role relies on? Credentials, config, scripts, scheduled jobs, templates.
  • Map "can write" against "gets executed or trusted by" across your system.
  • Threat model with a question that crosses roles: starting as this user, how could I become that one?
  • Treat any right that lets an actor grant rights as chain material.

How to fix it

  1. Remove the ability for lower roles to change data that higher roles trust.
  2. Separate duties so that no single role holds both ends of a chain.
  3. Do not let an application assign permissions to itself.
  4. Re-run the combination review whenever you add a role or a feature.
Role: operator
  can: restart services, view logs
  must not: edit user store, edit sudoers, edit job definitions

Quick check

Why do per role access reviews miss privilege chaining?

They check each right on its own. The risk comes from what two rights allow together, so the review has to consider combinations.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.