CVE-2025-52122 The Freeform CraftCMS plugin contains an Server-side template injection (SSTI) vulnerability

Critical 9.8 Published Updated

An attacker with form editing access can inject arbitrary code via server-side template injection in the Freeform plugin.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-52122?

CVE-2025-52122 is a critical code injection vulnerability in n/a, published on 27 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Freeform 5.0.0 to before 5.10.16, a plugin for CraftCMS, contains an Server-side template injection (SSTI) vulnerability, resulting in arbitrary code injection for all users that have access to editing a form (submission title).

Weakness: CWE-94, CWE-1336

Which versions are affected by CVE-2025-52122?

2 open source packages ship an affected version, including solspace/craft-freeform. It affects 1 product.

PackageAffectedFixed in
solspace/craft-freeform PackagistFrom 5.0.05.10.16
solspace/craft-freeform PackagistFrom 5.0.05.10.16

Products include Solspace Freeform.

How do I fix CVE-2025-52122?

Upgrade solspace/craft-freeform to 5.10.16 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-52122 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-52122 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-9hp3-f5g8-rccg.

Is CVE-2025-52122 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free