# CVE-2026-126642: Awx: webhook credential assignment omits use_role check, exposing another user's token

Status: published. Published: 2026-11-12. Updated: 2026-11-12.

An incorrect authorization flaw was found in AWX, the automation controller component of Red Hat Ansible Automation Platform. The API access classes for JobTemplate and WorkflowJobTemplate do not check the caller's Credential use_role when assigning the single-valued webhook_credential foreign key: JobTemplateAccess.can_add/can_change and WorkflowJobTemplateAccess.can_change in awx/main/access.py omit the check_related('webhook_credential', Credential, ..., role_field='use_role') call that UnifiedCredentialsMixin.can_attach performs for the normal many-to-many credentials relationship, and the serializer validates only the credential's type and namespace. A user who may administer their own job template (or workflow job template) and use its project and inventory can therefore attach a webhook token credential (for example a GitLab token) that they do not have use permission on. The template administrator can retrieve the template's webhook key; a subsequent webhook event causes AWX to decrypt the attached token and send it in the request header (for GitLab, PRIVATE-TOKEN) to a status URL derived from the event payload, disclosing the victim's token to a destination the attacker can influence. This may disclose another user's personal access token and allow whatever actions that token permits.

## Remediation

- workaround: Grant the Job Template and Workflow Job Template administrator role only to trusted users, and avoid storing webhook token credentials in organizations where untrusted users hold template-admin rights. There is no complete configuration-only mitigation; apply the fix when it becomes available. (source: CNA: redhat)

## Affected products and versions

- Red Hat / Red Hat Ansible Automation Platform 2 (ansible-automation-platform-24/controller-rhel8): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2 (ansible-automation-platform-25/controller-rhel8): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2 (ansible-automation-platform-26/controller-rhel9): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2 (ansible-automation-platform-27/controller-rhel9): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2 (automation-controller): Version range not reported. Source: CNA: redhat

## Severity and prioritization

- CVSS 3.1: 6.5 (medium); CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N; source: CNA: redhat

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-862

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://access.redhat.com/security/cve/CVE-2026-126642 (CNA: redhat; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2571729 (CNA: redhat; issue-tracking, x_refsource_REDHAT)

## Provenance

- CNA: redhat: https://www.cve.org/CVERecord?id=CVE-2026-126642; retrieved 2026-11-12; source updated 2026-11-12

Revision: 20f012c882c4c30f285bc1ec36d21623f619d6d38718e3176ec09595d89bde37

Canonical: https://y2.dev/cve/CVE-2026-126642

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.