CVE-2023-30179: Withdrawn Advisory CraftCMS Server-Side Template Injection Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-3x74-v64j-qc3f
CVSS 7.2
CWE-94
Published
Advisory Summary

CVE-2023-30179 is a HIGH (CVSS 7.2) craftcms server-side template injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Withdrawn Advisory libraries in the Packagist ecosystem. The issue involves craftcms server-side template injection vulnerability. Remediation is available by upgrading affected packages to version 4.4.2.

CVE-2023-30179 at a Glance

CVE Identifier CVE-2023-30179
GHSA Identifier GHSA-3x74-v64j-qc3f
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Withdrawn Advisory
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.2

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

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

How to Fix CVE-2023-30179

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

craftcms/cms fixed: 4.4.2
Upgrade craftcms/cms to 4.4.2
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 craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-30179, inspect your project dependencies for Withdrawn Advisory:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.2), 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 Withdrawn Advisory, 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

## Withdrawn This advisory has been withdrawn because the CVE has been disputed and the underlying vulnerability is likely invalid. This link is maintained to preserve external references. [According to maintainers of Craft CMS](https://github.com/github/advisory-database/pull/2443#issuecomment-1610634200), only administrators can access Settings, and those administrators may have business needs for their permissions. Additionally, the underlying issue likely has little to no real-world security impact. ## Original Description CraftCMS is vulnerable to Server-Side Template Injection (SSTI). An authenticated attacker can inject Twig Template to User Photo Location field when setting User Photo Location in User Settings, lead to Remote Code Execution.

CVE-2023-30179 Affected Withdrawn Advisory Versions

1 component(s)
Fixed Versions:
4.4.2
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
< 4.4.2
4.4.2

References

Frequently Asked Questions

What is CVE-2023-30179?
CVE-2023-30179 is a security vulnerability in Withdrawn Advisory involving CraftCMS Server-Side Template Injection vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to 4.4.2 across affected packages: craftcms/cms.
What version fixes CVE-2023-30179?
Upgrading to 4.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 4.4.2. Upgrade your dependency to 4.4.2 or later.
What is the CVSS score of CVE-2023-30179?
CVE-2023-30179 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-30179?
CVE-2023-30179 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-2023-30179?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. 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-3x74-v64j-qc3f",
  "modified" : "2024-03-21T17:48:19Z",
  "published" : "2023-06-13T18:30:39Z",
  "withdrawn" : "2023-06-28T23:54:39Z",
  "aliases" : [ "CVE-2023-30179" ],
  "summary" : "Withdrawn Advisory: CraftCMS Server-Side Template Injection vulnerability",
  "details" : "## Withdrawn\nThis advisory has been withdrawn because the CVE has been disputed and the underlying vulnerability is likely invalid. This link is maintained to preserve external references.\n\n[According to maintainers of Craft CMS](https://github.com/github/advisory-database/pull/2443#issuecomment-1610634200), only administrators can access Settings, and those administrators may have business needs for their permissions. Additionally, the underlying issue likely has little to no real-world security impact.\n\n## Original Description\nCraftCMS is vulnerable to Server-Side Template Injection (SSTI). An authenticated attacker can inject Twig Template to User Photo Location field when setting User Photo Location in User Settings, lead to Remote Code Execution.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.4.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30179"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/2443"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/2443#issuecomment-1610040714"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/2443#issuecomment-1610634200"
  }, {
    "type" : "WEB",
    "url" : "https://datnlq.gitbook.io/cve/craft-cms/cve-2023-30179-server-side-template-injection"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/blob/develop/CHANGELOG.md#442---2023-03-14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-14T16:47:17Z",
    "nvd_published_at" : "2023-06-13T17:15:14Z"
  }
}