CVE-2020-11056: Barrelstrength/sprout base email Potential Code Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-px8v-hxxx-2rgh
CVSS 7.4
CWE-94 CWE-74
Published
Advisory Summary

CVE-2020-11056 is a CRITICAL (CVSS 7.4) potential code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Barrelstrength/sprout base email libraries in the Packagist ecosystem. The issue involves potential code injection in sprout forms. Remediation is available by upgrading affected packages to version 1.2.7, 3.9.0.

CVE-2020-11056 at a Glance

CVE Identifier CVE-2020-11056
GHSA Identifier GHSA-px8v-hxxx-2rgh
Severity CRITICAL
CVSS v3.1 Base Score 7.4
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Barrelstrength/sprout base email
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.4

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2020-11056

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

barrelstrength/sprout-base-email fixed: 1.2.7
Upgrade barrelstrength/sprout-base-email to 1.2.7
barrelstrength/sprout-forms fixed: 3.9.0
Upgrade barrelstrength/sprout-forms to 3.9.0
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 barrelstrength/sprout-base-email

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-11056, inspect your project dependencies for Barrelstrength/sprout base email:

inspect dependencies for barrelstrength/sprout-base-email

Analyze the terminal output to locate any version of Barrelstrength/sprout base email in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.7), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Barrelstrength/sprout base email, 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 A potential Server-Side Template Injection vulnerability exists in Sprout Forms which could lead to the execution of Twig code. ### Patches The problem is fixed in`barrelstrength/sprout-forms:v3.9.0` which upgrades to `barrelstrength/sprout-base-email:v1.2.7` ### Workarounds Users unable to upgrade should update any Notification Emails to use the "Basic Notification (Sprout Email)" template and avoid using the "Basic Notification (Sprout Forms)" template or any custom templates that display Form Fields. ### References - See the release notes in the [CHANGELOG](https://github.com/barrelstrength/craft-sprout-forms/blob/v3/CHANGELOG.md#390---2020-04-09-critical) - Credits to Paweł Hałdrzyński, Daniel Kalinowski from [ISEC.PL](https://isec.pl/) for discovery and responsible disclosure ### For more information If you have any questions or comments about this advisory: * Open an issue in the [Sprout Forms repo](https://github.com/barrelstrength/craft-sprout-forms/issues) * Email us at [sprout@barrelstrengthdesign.com](mailto:sprout@barrelstrengthdesign.com)

CVE-2020-11056 Affected Barrelstrength/sprout base email Versions

2 component(s)
Fixed Versions:
1.2.73.9.0
Product / Package Ecosystem Affected Versions Fixed Version
barrelstrength/sprout-base-email
Packagist
< 1.2.7
1.2.7
barrelstrength/sprout-forms
Packagist
< 3.9.0
3.9.0

References

Frequently Asked Questions

What is CVE-2020-11056?
CVE-2020-11056 is a security vulnerability in Barrelstrength/sprout base email involving Potential Code Injection in Sprout Forms under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Barrelstrength/sprout base email versions are affected?
Affected versions include releases prior to 1.2.7, 3.9.0 across affected packages: barrelstrength/sprout-base-email, barrelstrength/sprout-forms.
What version fixes CVE-2020-11056?
Upgrading to 1.2.7, 3.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is barrelstrength/sprout-base-email affected?
Yes, barrelstrength/sprout-base-email is affected in releases prior to 1.2.7. Upgrade your dependency to 1.2.7 or later.
Is barrelstrength/sprout-forms affected?
Yes, barrelstrength/sprout-forms is affected in releases prior to 3.9.0. Upgrade your dependency to 3.9.0 or later.
What is the CVSS score of CVE-2020-11056?
CVE-2020-11056 has a CVSS v3.1 base score of 7.4 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2020-11056?
CVE-2020-11056 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2020-11056?
Run the dependency tree command: 'inspect dependencies for barrelstrength/sprout-base-email'. 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-px8v-hxxx-2rgh",
  "modified" : "2021-10-27T17:00:42Z",
  "published" : "2020-05-08T21:00:02Z",
  "aliases" : [ "CVE-2020-11056" ],
  "summary" : "Potential Code Injection in Sprout Forms",
  "details" : "### Impact\n\nA potential Server-Side Template Injection vulnerability exists in Sprout Forms which could lead to the execution of Twig code.\n\n### Patches\n\nThe problem is fixed in`barrelstrength/sprout-forms:v3.9.0` which upgrades to `barrelstrength/sprout-base-email:v1.2.7`\n\n### Workarounds\n\nUsers unable to upgrade should update any Notification Emails to use the \"Basic Notification (Sprout Email)\" template and avoid using the \"Basic Notification (Sprout Forms)\" template or any custom templates that display Form Fields.\n\n### References\n\n- See the release notes in the [CHANGELOG](https://github.com/barrelstrength/craft-sprout-forms/blob/v3/CHANGELOG.md#390---2020-04-09-critical)\n- Credits to Paweł Hałdrzyński, Daniel Kalinowski from [ISEC.PL](https://isec.pl/) for discovery and responsible disclosure\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in the [Sprout Forms repo](https://github.com/barrelstrength/craft-sprout-forms/issues)\n* Email us at [sprout@barrelstrengthdesign.com](mailto:sprout@barrelstrengthdesign.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "barrelstrength/sprout-base-email"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "barrelstrength/sprout-forms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/barrelstrength/craft-sprout-forms/security/advisories/GHSA-px8v-hxxx-2rgh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11056"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/barrelstrength/craft-sprout-base-email/commit/5ef759f4713ede6dbf77c9d9df9f992876e43a49"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/barrelstrength/craft-sprout-forms/blob/v3/CHANGELOG.md#390---2020-04-09-critical"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-08T19:12:33Z",
    "nvd_published_at" : "2020-05-07T21:15:00Z"
  }
}