CVE-2019-6799: Phpmyadmin/phpmyadmin PhpMyAdmin Arbitrary File Read Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-c8wj-q36q-3wg4
CVSS 5.9
CWE-22
Published
Advisory Summary

CVE-2019-6799 is a MODERATE (CVSS 5.9) phpmyadmin arbitrary file read vulnerability vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Phpmyadmin/phpmyadmin libraries in the Packagist ecosystem. The issue involves phpmyadmin arbitrary file read vulnerability. Remediation is available by upgrading affected packages to version 4.8.5.

CVE-2019-6799 at a Glance

CVE Identifier CVE-2019-6799
GHSA Identifier GHSA-c8wj-q36q-3wg4
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Phpmyadmin/phpmyadmin
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2019-6799

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

phpmyadmin/phpmyadmin fixed: 4.8.5
Upgrade phpmyadmin/phpmyadmin to 4.8.5
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 phpmyadmin/phpmyadmin

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-6799, inspect your project dependencies for Phpmyadmin/phpmyadmin:

inspect dependencies for phpmyadmin/phpmyadmin

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

An issue was discovered in phpMyAdmin before 4.8.5. When the AllowArbitraryServer configuration setting is set to true, with the use of a rogue MySQL server, an attacker can read any file on the server that the web server's user can access. This is related to the mysql.allow_local_infile PHP configuration, and the inadvertent ignoring of "options(MYSQLI_OPT_LOCAL_INFILE" calls.

CVE-2019-6799 Affected Phpmyadmin/phpmyadmin Versions

1 component(s)
Fixed Versions:
4.8.5
Product / Package Ecosystem Affected Versions Fixed Version
phpmyadmin/phpmyadmin
Packagist
≥ 4.8
< 4.8.5
4.8.5

References

Frequently Asked Questions

What is CVE-2019-6799?
CVE-2019-6799 is a security vulnerability in Phpmyadmin/phpmyadmin involving phpMyAdmin Arbitrary file read vulnerability under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Phpmyadmin/phpmyadmin versions are affected?
Affected versions include releases prior to 4.8.5 across affected packages: phpmyadmin/phpmyadmin.
What version fixes CVE-2019-6799?
Upgrading to 4.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpmyadmin/phpmyadmin affected?
Yes, phpmyadmin/phpmyadmin is affected in releases prior to 4.8.5. Upgrade your dependency to 4.8.5 or later.
What is the CVSS score of CVE-2019-6799?
CVE-2019-6799 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2019-6799?
CVE-2019-6799 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-2019-6799?
Run the dependency tree command: 'inspect dependencies for phpmyadmin/phpmyadmin'. 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-c8wj-q36q-3wg4",
  "modified" : "2024-04-24T18:14:13Z",
  "published" : "2022-05-13T01:22:46Z",
  "aliases" : [ "CVE-2019-6799" ],
  "summary" : "phpMyAdmin Arbitrary file read vulnerability",
  "details" : "An issue was discovered in phpMyAdmin before 4.8.5. When the AllowArbitraryServer configuration setting is set to true, with the use of a rogue MySQL server, an attacker can read any file on the server that the web server's user can access. This is related to the mysql.allow_local_infile PHP configuration, and the inadvertent ignoring of \"options(MYSQLI_OPT_LOCAL_INFILE\" calls.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpmyadmin/phpmyadmin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.8"
      }, {
        "fixed" : "4.8.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-6799"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phpmyadmin/composer"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/02/msg00039.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.phpmyadmin.net/security/PMASA-2019-1"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/106736"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-24T18:14:13Z",
    "nvd_published_at" : "2019-01-26T17:29:00Z"
  }
}