Średnia

Solspace Freeform: Limited Twig template injection via submitted field values

  • Ujawniono: 23.09.2026
  • Aktualizacja: 11.10.2026 10:22

Summary

A limited server-side Twig template injection issue was identified in Solspace Freeform for Craft CMS. In affected versions, submitted form field values could be evaluated as Twig in certain rendering contexts.

Unauthenticated users could submit Twig expressions through public Freeform forms and have those expressions evaluated when the submitted values were rendered back into the form response. Confirmed impact includes disclosure of limited server/environment information, such as the PHP version and absolute filesystem paths.

No evidence was found that this issue allowed access to Craft globals, environment variables, database credentials, mailer credentials, security keys, or remote code execution in the tested environment.

Details

Plugin: Solspace Freeform Affected versions: Freeform 5.0.0 through 5.10.13 CMS: Craft CMS Authentication required: None Attack vector: Public Freeform form submission

Submitted field values were passed through Freeform’s isolated Twig renderer. As a result, Twig expressions included in submitted values could be evaluated server-side and reflected in the HTTP response.

The isolated Twig context appears to limit the available functions and globals. Confirmed accessible values were limited to PHP/core constants and Craft bootstrap constants such as:

twig
{{ constant('PHP_VERSION') }}
{{ constant('PHP_OS') }}
{{ constant('CRAFT_BASE_PATH') }}
{{ constant('CRAFT_VENDOR_PATH') }}

Testing did not confirm access to:

craft
craft.app
alias()
getenv()
database credentials
mailer credentials
Craft security key
Craft license key
environment variables

Proof of Concept

  1. Submit a public Freeform form.

  2. Inject the following payload into an email field:

twig
{{ constant('PHP_VERSION') }}@example.com

The response may reflect the evaluated PHP version, for example:

html
value="8.2.27@example.com"
  1. Inject the following payload into a text field:
twig
{{ constant('CRAFT_VENDOR_PATH') }}

The response may reflect the absolute vendor path, for example:

/var/www/example-site/production/vendor/

Impact

An unauthenticated attacker with access to a public Freeform form could cause limited Twig expressions to be evaluated server-side.

Confirmed impact includes:

PHP version disclosure
Operating system/platform disclosure
Absolute filesystem path disclosure
Potential form rendering errors from malformed Twig input

This could assist with environment fingerprinting or be used in combination with other vulnerabilities. However, no credential disclosure, Craft application access, arbitrary file read, or remote code execution was confirmed.

Remediation

Freeform should treat submitted field values as plain user input and should not evaluate them as Twig. Twig rendering should be limited to trusted/admin-authored templates and configuration values.

This issue has been resolved by preventing submitted field values from being rendered as Twig in the affected context.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka Composer solspace/craft-freeform >= 5.0.0, < 5.10.14 5.10.14

Odnośniki

Ocena CVSS 5.3/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Słabość (CWE)
CWE-1336
Platforma
Composer
Paczka
solspace/craft-freeform
Ujawniono
23.09.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-gxrg-x694-283w - CC BY 4.0

Historia podatności: solspace/craft-freeform

Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
6
Pierwsza → ostatnia
08.2025 09.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 1
  • Średnia 1
  • Niska 4

Ujawnienia w latach

  1. 2025: 1
  2. 2026: 5
  1. Solspace Freeform: Limited Twig template injection via submitted field values ten wpis
    Średnia · 5.3 CVE-2026-73858 >= 5.0.0, < 5.10.14 5.10.14
  2. Niska ghsa-rwr8-xrpw-9qf5 < 4.1.22, >= 5.0.0-beta.1, < 5.5.9 4.1.22, 5.5.9
  3. Niska ghsa-58q2-9x27-h2jm < 4.1.30 4.1.30
  4. Krytyczna · 9.8 CVE-2025-52122 >= 5.0.0, < 5.10.16 5.10.16

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.