CVE-2021-28381: SQL injection in vhs (aka VHS Fluid ViewHelpers) Vulnerability

CRITICAL
Advisory Identifier: GHSA-wq4r-8342-jmc9
CVSS 5.4
CWE-89
Published
Advisory Summary

CVE-2021-28381 is a CRITICAL (CVSS 5.4) fluid viewhelpers) vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting SQL injection in vhs (aka VHS libraries in the Packagist ecosystem. The issue involves fluid viewhelpers). Remediation is available by upgrading affected packages to version 5.1.1.

CVE-2021-28381 at a Glance

CVE Identifier CVE-2021-28381
GHSA Identifier GHSA-wq4r-8342-jmc9
Severity CRITICAL
CVSS v3.1 Base Score 5.4
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product SQL injection in vhs (aka VHS
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

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

How to Fix CVE-2021-28381

To remediate this vulnerability, upgrade all affected SQL injection in vhs (aka VHS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fluidtypo3/vhs fixed: 5.1.1
Upgrade fluidtypo3/vhs to 5.1.1
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 fluidtypo3/vhs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-28381, inspect your project dependencies for SQL injection in vhs (aka VHS:

inspect dependencies for fluidtypo3/vhs

Analyze the terminal output to locate any version of SQL injection in vhs (aka VHS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.1), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In SQL injection in vhs (aka VHS, 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

The vhs (aka VHS: Fluid ViewHelpers) extension before 5.1.1 for TYPO3 allows SQL injection via isLanguageViewHelper.

CVE-2021-28381 Affected SQL injection in vhs (aka VHS Versions

1 component(s)
Fixed Versions:
5.1.1
Product / Package Ecosystem Affected Versions Fixed Version
fluidtypo3/vhs
Packagist
< 5.1.1
5.1.1

References

Frequently Asked Questions

What is CVE-2021-28381?
CVE-2021-28381 is a security vulnerability in SQL injection in vhs (aka VHS involving Fluid ViewHelpers) under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which SQL injection in vhs (aka VHS versions are affected?
Affected versions include releases prior to 5.1.1 across affected packages: fluidtypo3/vhs.
What version fixes CVE-2021-28381?
Upgrading to 5.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fluidtypo3/vhs affected?
Yes, fluidtypo3/vhs is affected in releases prior to 5.1.1. Upgrade your dependency to 5.1.1 or later.
What is the CVSS score of CVE-2021-28381?
CVE-2021-28381 has a CVSS v3.1 base score of 5.4 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:F/RL:O/RC:C.
What CWE is associated with CVE-2021-28381?
CVE-2021-28381 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2021-28381?
Run the dependency tree command: 'inspect dependencies for fluidtypo3/vhs'. 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-wq4r-8342-jmc9",
  "modified" : "2021-03-23T20:31:43Z",
  "published" : "2021-03-29T20:24:44Z",
  "aliases" : [ "CVE-2021-28381" ],
  "summary" : "SQL injection in vhs (aka VHS: Fluid ViewHelpers)",
  "details" : "The vhs (aka VHS: Fluid ViewHelpers) extension before 5.1.1 for TYPO3 allows SQL injection via isLanguageViewHelper.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:F/RL:O/RC:C"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "fluidtypo3/vhs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-28381"
  }, {
    "type" : "WEB",
    "url" : "https://typo3.org/security/advisory/typo3-ext-sa-2021-001"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-23T20:31:43Z",
    "nvd_published_at" : "2021-03-16T20:15:00Z"
  }
}