CVE-2022-46158: Prestashop/prestashop PrestaShop Has Potential Information Exposure Vulnerability

MODERATE
Advisory Identifier: GHSA-9qgp-9wwc-v29r
CVSS 5.3
CWE-862 CWE-200
Published
Advisory Summary

CVE-2022-46158 is a MODERATE (CVSS 5.3) prestashop has potential information exposure vulnerability (CWE-862: Missing Authorization) affecting Prestashop/prestashop libraries in the Packagist ecosystem. The issue involves prestashop has potential information exposure in the upload directory. Remediation is available by upgrading affected packages to version 1.7.8.8.

CVE-2022-46158 at a Glance

CVE Identifier CVE-2022-46158
GHSA Identifier GHSA-9qgp-9wwc-v29r
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-862: Missing Authorization
Affected Product Prestashop/prestashop
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2022-46158

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

prestashop/prestashop fixed: 1.7.8.8
Upgrade prestashop/prestashop to 1.7.8.8
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 prestashop/prestashop

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-46158, inspect your project dependencies for Prestashop/prestashop:

inspect dependencies for prestashop/prestashop

Analyze the terminal output to locate any version of Prestashop/prestashop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.8.8), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Prestashop/prestashop, 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 Potential Information exposure in the upload directory. ### Patches Patch in PrestaShop 1.7.8.8 ### References https://capec.mitre.org/data/definitions/87.html Thanks to DZPATROL

CVE-2022-46158 Affected Prestashop/prestashop Versions

1 component(s)
Fixed Versions:
1.7.8.8
Product / Package Ecosystem Affected Versions Fixed Version
prestashop/prestashop
Packagist
< 1.7.8.8
1.7.8.8

References

Frequently Asked Questions

What is CVE-2022-46158?
CVE-2022-46158 is a security vulnerability in Prestashop/prestashop involving PrestaShop has potential Information exposure in the upload directory under CWE-862: Missing Authorization.
Which Prestashop/prestashop versions are affected?
Affected versions include releases prior to 1.7.8.8 across affected packages: prestashop/prestashop.
What version fixes CVE-2022-46158?
Upgrading to 1.7.8.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is prestashop/prestashop affected?
Yes, prestashop/prestashop is affected in releases prior to 1.7.8.8. Upgrade your dependency to 1.7.8.8 or later.
What is the CVSS score of CVE-2022-46158?
CVE-2022-46158 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-46158?
CVE-2022-46158 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for CVE-2022-46158?
Run the dependency tree command: 'inspect dependencies for prestashop/prestashop'. 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-9qgp-9wwc-v29r",
  "modified" : "2022-12-12T20:47:11Z",
  "published" : "2022-12-08T16:11:54Z",
  "aliases" : [ "CVE-2022-46158" ],
  "summary" : "PrestaShop has potential Information exposure in the upload directory",
  "details" : "### Impact\nPotential Information exposure in the upload directory.\n\n### Patches\nPatch in PrestaShop 1.7.8.8\n\n### References\nhttps://capec.mitre.org/data/definitions/87.html\n\nThanks to DZPATROL\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "prestashop/prestashop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.8.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/PrestaShop/PrestaShop/security/advisories/GHSA-9qgp-9wwc-v29r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46158"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PrestaShop/PrestaShop/commit/8684d429fb7c3bb51efb098e8b92a1fd2958f8cf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/PrestaShop/PrestaShop"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PrestaShop/PrestaShop/releases/tag/1.7.8.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-08T16:11:54Z",
    "nvd_published_at" : "2022-12-08T22:15:00Z"
  }
}