CVE-2022-25769: Mautic/core Improper Regex Vulnerability

MODERATE
Advisory Identifier: GHSA-mj6m-246h-9w56
Published
Advisory Summary

CVE-2022-25769 is a MODERATE improper regex vulnerability (General Security Weakness) affecting Mautic/core libraries in the Packagist ecosystem. The issue involves improper regex in htaccess file. Remediation is available by upgrading affected packages to version 3.3.5, 4.2.0.

CVE-2022-25769 at a Glance

CVE Identifier CVE-2022-25769
GHSA Identifier GHSA-mj6m-246h-9w56
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Mautic/core
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2022-25769

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: 3.3.5
Upgrade mautic/core to 3.3.5
mautic/core fixed: 4.2.0
Upgrade mautic/core to 4.2.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 mautic/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-25769, 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 3.3.5), 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 General Security Weakness. 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

### Impact the default .htaccess file has some restrictions in the access to PHP files to only allow specific PHP files to be executed in the root of the application. This logic isn't correct, as the regex in the second FilesMatch only checks the filename, not the full path. ### Patches Please upgrade to 3.3.5 or 4.2.0 ### Workarounds No ### References - Release post: https://www.mautic.org/blog/community/mautic-4-2-one-small-step-mautic - Internally tracked under MST-32 ### For more information If you have any questions or comments about this advisory: * Email us at [security@mautic.org](mailto:security@mautic.org)

CVE-2022-25769 Affected Mautic/core Versions

2 component(s)
Fixed Versions:
3.3.54.2.0
Product / Package Ecosystem Affected Versions Fixed Version
mautic/core
Packagist
< 3.3.5
3.3.5
mautic/core
Packagist
≥ 4.0.0
< 4.2.0
4.2.0

References

Frequently Asked Questions

What is CVE-2022-25769?
CVE-2022-25769 is a security vulnerability in Mautic/core involving Improper regex in htaccess file under General Security Weakness.
Which Mautic/core versions are affected?
Affected versions include releases prior to 3.3.5, 4.2.0 across affected packages: mautic/core.
What version fixes CVE-2022-25769?
Upgrading to 3.3.5, 4.2.0 (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 3.3.5, 4.2.0. Upgrade your dependency to 3.3.5, 4.2.0 or later.
What CWE is associated with CVE-2022-25769?
CVE-2022-25769 is classified under General Security Weakness.
How can I check Packagist dependencies for CVE-2022-25769?
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-mj6m-246h-9w56",
  "modified" : "2022-03-01T22:05:34Z",
  "published" : "2022-03-01T22:05:34Z",
  "aliases" : [ "CVE-2022-25769" ],
  "summary" : "Improper regex in htaccess file",
  "details" : "### Impact\nthe default .htaccess file has some restrictions in the access to PHP files to only allow specific PHP files to be executed in the root of the application.\n\nThis logic isn't correct, as the regex in the second FilesMatch only checks the filename, not the full path.\n\n### Patches\nPlease upgrade to 3.3.5 or 4.2.0 \n\n### Workarounds\nNo\n\n### References\n\n- Release post: https://www.mautic.org/blog/community/mautic-4-2-one-small-step-mautic\n- Internally tracked under MST-32\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@mautic.org](mailto:security@mautic.org)\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mautic/mautic/security/advisories/GHSA-mj6m-246h-9w56"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-01T22:05:34Z",
    "nvd_published_at" : null
  }
}