CVE-2022-25773: Mautic/core Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-4w2w-36vm-c8hf
CVSS 4.3
CWE-22
Published
Advisory Summary

CVE-2022-25773 is a MODERATE (CVSS 4.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Mautic/core libraries in the Packagist ecosystem. The issue involves mautic allows relative path traversal in assets file upload. Remediation is available by upgrading affected packages to version 5.2.3.

CVE-2022-25773 at a Glance

CVE Identifier CVE-2022-25773
GHSA Identifier GHSA-4w2w-36vm-c8hf
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Mautic/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.3

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:U/C:N/I:N/A:L).

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

How to Fix CVE-2022-25773

To remediate this vulnerability, upgrade all affected Mautic/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.

mautic/core fixed: 5.2.3
Upgrade mautic/core to 5.2.3
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 mautic/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-25773, inspect your project dependencies for Mautic/core:

inspect dependencies for mautic/core

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

### Summary This advisory addresses a file placement vulnerability that could allow assets to be uploaded to unintended directories on the server. * **Improper Limitation of a Pathname to a Restricted Directory:** A vulnerability exists in the asset upload functionality that allows users to upload files to directories outside of the intended temporary directory. ### Mitigation Please update to 5.2.3 or later. ### Workarounds None ### References If you have any questions or comments about this advisory: Email us at [security@mautic.org](mailto:security@mautic.org)

CVE-2022-25773 Affected Mautic/core Versions

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

References

Frequently Asked Questions

What is CVE-2022-25773?
CVE-2022-25773 is a security vulnerability in Mautic/core involving Mautic allows Relative Path Traversal in assets file upload under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Mautic/core versions are affected?
Affected versions include releases prior to 5.2.3 across affected packages: mautic/core.
What version fixes CVE-2022-25773?
Upgrading to 5.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mautic/core affected?
Yes, mautic/core is affected in releases prior to 5.2.3. Upgrade your dependency to 5.2.3 or later.
What is the CVSS score of CVE-2022-25773?
CVE-2022-25773 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2022-25773?
CVE-2022-25773 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-2022-25773?
Run the dependency tree command: 'inspect dependencies for mautic/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-4w2w-36vm-c8hf",
  "modified" : "2025-10-16T20:41:36Z",
  "published" : "2025-02-26T20:09:28Z",
  "aliases" : [ "CVE-2022-25773" ],
  "summary" : "Mautic allows Relative Path Traversal in assets file upload",
  "details" : "### Summary\n\nThis advisory addresses a file placement vulnerability that could allow assets to be uploaded to unintended directories on the server.\n\n* **Improper Limitation of a Pathname to a Restricted Directory:** A vulnerability exists in the asset upload functionality that allows users to upload files to directories outside of the intended temporary directory.\n\n### Mitigation\n\nPlease update to 5.2.3 or later.\n\n### Workarounds\n\nNone\n\n### References\n\nIf you have any questions or comments about this advisory:\n\nEmail us at [security@mautic.org](mailto:security@mautic.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mautic/mautic/security/advisories/GHSA-4w2w-36vm-c8hf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25773"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mautic/mautic/commit/e6aaad99f399c5df1ce6273609920098e5c2564a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mautic/mautic"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-26T20:09:28Z",
    "nvd_published_at" : "2025-02-26T13:15:32Z"
  }
}