Bug 2522227 (CVE-2026-92982) - CVE-2026-92982 ansible-operator-plugins: Ansible Operator Plugins: Arbitrary Code Execution via Jinja2 Template Injection
Summary: CVE-2026-92982 ansible-operator-plugins: Ansible Operator Plugins: Arbitrary ...
Keywords:
Status: NEW
Alias: CVE-2026-92982
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-24 17:39 UTC by OSIDB Bzimport
Modified: 2026-10-15 13:59 UTC (History)
53 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-08-24 17:39:32 UTC
## CR spec values passed to Ansible without unsafe-marking by default (Jinja2 template injection)

**CWEs:** CWE-1336, CWE-94
**CVSS:** 8.5 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H)
**Component:** kiali-ossm/ansible-operator-plugins

### Description
makeParameters() copies every field of a watched custom resource's spec verbatim into the ansible-runner extravars, and only wraps string values with __ansible_unsafe when the watch sets markUnsafe: true. The default is false (watches.go:81) and the scaffolded watches.yaml does not enable it. Ansible renders extra vars through Jinja2 wherever a playbook or role templates them, so a Kubernetes user who can create or update the watched CR (a namespaced, typically low-privilege grant) can place Jinja2 expressions in spec fields that are evaluated inside the operator pod during reconciliation.

### Affected Locations
- `:`
- `:`

### Evidence
**internal/ansible/runner/runner.go:356-360 — unsafe-marking is opt-in**
```go
if r.markUnsafe {
    for key, val := range parameters {
        parameters[key] = markUnsafe(val)
    }
}
```

**internal/ansible/watches/watches.go:81 — default leaves CR values templatable**
```go
markUnsafeDefault                  = false
```

### Attack Pattern
A user with create/update on the watched CR gains code execution in the operator pod and thereby the operator service account's cluster RBAC.

---
*Source: Ex-Wing security assessment, finding FIND-001*


Note You need to log in before you can comment on or make changes to this bug.