CVE-2024-35191: Verbb/formie Verbb/formie Server-Side Template Injection For Vulnerability

MODERATE
Advisory Identifier: GHSA-v45m-hxqp-fwf5
CVSS 4.4
CWE-1336
Published
Advisory Summary

CVE-2024-35191 is a MODERATE (CVSS 4.4) verbb/formie server-side template injection for vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Verbb/formie libraries in the Packagist ecosystem. The issue involves verbb/formie server-side template injection for variable-enabled settings. Remediation is available by upgrading affected packages to version 2.1.6.

CVE-2024-35191 at a Glance

CVE Identifier CVE-2024-35191
GHSA Identifier GHSA-v45m-hxqp-fwf5
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
Affected Product Verbb/formie
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-35191

To remediate this vulnerability, upgrade all affected Verbb/formie dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

verbb/formie fixed: 2.1.6
Upgrade verbb/formie to 2.1.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for verbb/formie

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-35191, inspect your project dependencies for Verbb/formie:

inspect dependencies for verbb/formie

Analyze the terminal output to locate any version of Verbb/formie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Verbb/formie, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Users with access to a form's settings can include malicious Twig code into fields that support Twig. These might be the Submission Title or the Success Message. This code will then be executed upon creating a submission, or rendering the text. This is listed as low-medium severity due to requiring control panel access to edit a form's settings. ### Patches This has been fixed in Formie 2.1.6. Users should ensure they are running at least this version.

CVE-2024-35191 Affected Verbb/formie Versions

1 component(s)
Fixed Versions:
2.1.6
Product / Package Ecosystem Affected Versions Fixed Version
verbb/formie
Packagist
< 2.1.6
2.1.6

References

Frequently Asked Questions

What is CVE-2024-35191?
CVE-2024-35191 is a security vulnerability in Verbb/formie involving verbb/formie Server-Side Template Injection for variable-enabled settings under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.
Which Verbb/formie versions are affected?
Affected versions include releases prior to 2.1.6 across affected packages: verbb/formie.
What version fixes CVE-2024-35191?
Upgrading to 2.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is verbb/formie affected?
Yes, verbb/formie is affected in releases prior to 2.1.6. Upgrade your dependency to 2.1.6 or later.
What is the CVSS score of CVE-2024-35191?
CVE-2024-35191 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-35191?
CVE-2024-35191 is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.).
How can I check Packagist dependencies for CVE-2024-35191?
Run the dependency tree command: 'inspect dependencies for verbb/formie'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v45m-hxqp-fwf5",
  "modified" : "2024-05-20T22:07:17Z",
  "published" : "2024-05-20T20:26:28Z",
  "aliases" : [ "CVE-2024-35191" ],
  "summary" : "verbb/formie Server-Side Template Injection for variable-enabled settings",
  "details" : "### Impact\nUsers with access to a form's settings can include malicious Twig code into fields that support Twig. These might be the Submission Title or the Success Message. This code will then be executed upon creating a submission, or rendering the text.\n\nThis is listed as low-medium severity due to requiring control panel access to edit a form's settings.\n\n### Patches\nThis has been fixed in Formie 2.1.6. Users should ensure they are running at least this version.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "verbb/formie"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/verbb/formie/security/advisories/GHSA-v45m-hxqp-fwf5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-35191"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/verbb/formie/commit/90296edf7e707f117e760aa57e70dbd43a854420"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/verbb/formie"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-20T20:26:28Z",
    "nvd_published_at" : "2024-05-20T21:15:09Z"
  }
}