CVE-2021-27367: Bolt/core Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-q88g-qx42-xfrh
CWE-22
Published
Advisory Summary

CVE-2021-27367 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Bolt/core libraries in the Packagist ecosystem. The issue involves path traversal in bolt/core. Remediation is available by upgrading affected packages to version 4.1.13.

CVE-2021-27367 at a Glance

CVE Identifier CVE-2021-27367
GHSA Identifier GHSA-q88g-qx42-xfrh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Bolt/core
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2021-27367

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

bolt/core fixed: 4.1.13
Upgrade bolt/core to 4.1.13
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 bolt/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-27367, inspect your project dependencies for Bolt/core:

inspect dependencies for bolt/core

Analyze the terminal output to locate any version of Bolt/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.13), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Bolt/core, 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

Controller/Backend/FileEditController.php and Controller/Backend/FilemanagerController.php in Bolt before 4.1.13 allow Directory Traversal.

CVE-2021-27367 Affected Bolt/core Versions

1 component(s)
Fixed Versions:
4.1.13
Product / Package Ecosystem Affected Versions Fixed Version
bolt/core
Packagist
< 4.1.13
4.1.13

References

Frequently Asked Questions

What is CVE-2021-27367?
CVE-2021-27367 is a security vulnerability in Bolt/core involving Path traversal in bolt/core under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Bolt/core versions are affected?
Affected versions include releases prior to 4.1.13 across affected packages: bolt/core.
What version fixes CVE-2021-27367?
Upgrading to 4.1.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bolt/core affected?
Yes, bolt/core is affected in releases prior to 4.1.13. Upgrade your dependency to 4.1.13 or later.
What CWE is associated with CVE-2021-27367?
CVE-2021-27367 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2021-27367?
Run the dependency tree command: 'inspect dependencies for bolt/core'. 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-q88g-qx42-xfrh",
  "modified" : "2021-02-24T06:53:21Z",
  "published" : "2021-02-18T20:51:56Z",
  "aliases" : [ "CVE-2021-27367" ],
  "summary" : "Path traversal in bolt/core",
  "details" : "Controller/Backend/FileEditController.php and Controller/Backend/FilemanagerController.php in Bolt before 4.1.13 allow Directory Traversal.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "bolt/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-27367"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bolt/core/pull/2371"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bolt/core/releases/tag/4.1.13"
  }, {
    "type" : "WEB",
    "url" : "https://packagist.org/packages/bolt/core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-02-18T17:53:12Z",
    "nvd_published_at" : "2021-02-17T21:15:00Z"
  }
}