# CVE-2026-32261: RCE via SSTI for users with permissions to access the Craft CMS Webhooks plugin

> Authenticated users with Webhooks plugin access can execute arbitrary PHP code via Twig template injection in Craft CMS.

- **Severity:** High 8.5 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Mar 2026
- **Updated:** 16 Mar 2026
- **Also known as:** GHSA-8wg7-wm29-2rvg

## What is CVE-2026-32261?

CVE-2026-32261 is a high-severity code injection vulnerability in craftcms webhooks, published on 16 Mar 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

Webhooks for Craft CMS plugin adds the ability to manage “webhooks” in Craft CMS, which will send GET or POST requests when certain events occur. From version 3.0.0 to before version 3.2.0, the Webhooks plugin renders user-supplied template content through Twig’s renderString() function without sandbox protection. This allows an authenticated user with access to the Craft control panel and permissions to access the Webhooks plugin to inject Twig template code that calls arbitrary PHP functions. This is possible even if allowAdminChanges is set to false. This issue has been patched in version 3.2.0.

Weakness: CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine)

## Which versions are affected by CVE-2026-32261?

2 open source packages ship an affected version, including craftcms/webhooks.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `craftcms/webhooks` | Packagist | From 3.0.0 | 3.2.0 |
| `craftcms/webhooks` | Packagist | From 3.0.0 | 3.2.0 |

## How do I fix CVE-2026-32261?

Upgrade craftcms/webhooks to 3.2.0 or later.

## Is CVE-2026-32261 being exploited?

There is no known exploitation of CVE-2026-32261 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-32261 and fix it if it is affected.

What it is: CVE-2026-32261 is a high-severity code injection vulnerability in craftcms webhooks, published on 16 Mar 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-32261 in the wild and no public exploit code.

Affected packages and fixed versions:
- craftcms/webhooks (Packagist): affected from 3.0.0; fixed in 3.2.0
- craftcms/webhooks (Packagist): affected from 3.0.0; fixed in 3.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-32261/ (Markdown: https://insights.sbomify.com/CVE-2026-32261/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-32261
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-32261
- OSV: https://osv.dev/vulnerability/CVE-2026-32261

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-32261/
Summaries are generated and may contain mistakes; the official description above is the record.
