Skip to content

Fixes #40032 - Backport API authorization to 3.19-stable - #11386

Open
Odilhao wants to merge 9 commits into
theforeman:3.19-stablefrom
Odilhao:backport/cve-authorization-3.19-stable
Open

Odilhao wants to merge 9 commits into
theforeman:3.19-stablefrom
Odilhao:backport/cve-authorization-3.19-stable

Conversation

@Odilhao

@Odilhao Odilhao commented Nov 12, 2026

Copy link
Copy Markdown
Member

Purpose

Backport of #11383 to 3.19-stable. Mainline review is still open; this PR references its actual public commit objects with -x, not a synthetic merge commit.

CVE Public issue
CVE-2026-86322 https://projects.theforeman.org/issues/40032
CVE-2026-86324 https://projects.theforeman.org/issues/40034
CVE-2026-86323 https://projects.theforeman.org/issues/40033
CVE-2026-107443 https://projects.theforeman.org/issues/40030

The eight source commits remain separate, with original authorship and dates. They enforce parent-user authorization for PAT, SSH key and mail-notification changes, and the additional host-template rendering permissions. Shared prerequisites are included once. Permitted self/admin operations and ENC's view_hosts behavior are preserved.

Stable compatibility

Host-template tests retain the two intended regression scenarios. Mail-notification tests use this release's available fixtures and attributes rather than newer fixture traits or notification options. No authorization assertions are weakened.

A separate upstream CI prerequisite installs libcap development headers for cap2 compilation: 64288e7. It is retained as its own signed cherry-pick.

Testing

Local results on the unchanged staged source, not a claim about this PR's GitHub Actions:

  • Affected controller/model suites: 370 tests, 901 assertions; no failures/errors/skips.
  • Full units: 5465 tests, 13533 assertions; no failures/errors; two existing skips.
  • Ruby lint, functional/GraphQL suites, JavaScript lint/tests, production assets, fresh-database seeds and browser/API-cache jobs passed locally for this target.
  • The affected suites passed again from the signed candidate's source. This publication changes provenance/signatures only; every commit tree matches the tested stable candidate.

Review scenarios: denied cross-user PAT/SSH/mail operations; no subscription writes after mail denial; permitted self/admin behavior; required host-template permissions; unchanged ENC access.

adamruzicka and others added 9 commits November 12, 2026 17:21
Enforce parent-user authorization before creating a personal access
token. A caller with token creation permission must not be able to
create a token for another account without permission to edit that user.

Add authorized user lookup to UserAware

(cherry picked from commit f77a94d)
Enforce parent-user authorization before creating a personal access
token. A caller with token creation permission must not be able to
create a token for another account without permission to edit that user.

Fix cross-user personal access token authorization

(cherry picked from commit d59207e)
Enforce parent-user authorization before creating SSH keys. A caller
with SSH key creation permission must not be able to attach a key to
another account without permission to edit that user.

Fix cross-user SSH key authorization

(cherry picked from commit 048acce)
Require provisioning-template permission for host template API access.
Host visibility alone must not grant access to sensitive values rendered
by provisioning templates. Preserve host visibility checks and the
existing ENC permission.

Restrict host template API access

(cherry picked from commit 2435e0b)
Require provisioning-template permission for host template API access.
Host visibility alone must not grant access to sensitive values rendered
by provisioning templates. Preserve host visibility checks and the
existing ENC permission.

Test host template API permissions

(cherry picked from commit 27bf969)
Authorize the target user before reading or modifying mail
notifications. Reject unauthorized cross-user requests before processing
can disclose subscriptions or persist configuration changes.

Extract authorized user lookup concern

(cherry picked from commit a978211)
Authorize the target user before reading or modifying mail
notifications. Reject unauthorized cross-user requests before processing
can disclose subscriptions or persist configuration changes.

Fix mail notification user authorization

(cherry picked from commit f90b756)
Authorize the target user before reading or modifying mail
notifications. Reject unauthorized cross-user requests before processing
can disclose subscriptions or persist configuration changes.

Strengthen mail notification authorization tests

Backport tests using the release-compatible notification fixtures and
attributes. Do not require newer notification factories or skip behavior.

(cherry picked from commit ce9f23a)
net-ping 2.1.0 added a runtime dependency on cap2, whose native
extension requires libcap headers to compile. Affects both GitHub
Actions CI (rubocop and tests jobs) and the production container
image's dnf-based builder stage.

(cherry picked from commit 64288e7)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants