GHSA-F8V5-JMFH-PR69

Vulnerability from github – Published: 2024-05-15 17:15 – Updated: 2024-05-15 19:35
VLAI
Summary
Grav Vulnerable to Arbitrary File Read to Account Takeover
Details

Summary

A low privilege user account with page edit privilege can read any server files using Twig Syntax. This includes Grav user account files - /grav/user/accounts/*.yaml. This file stores hashed user password, 2FA secret, and the password reset token. This can allow an adversary to compromise any registered account by resetting a password for a user to get access to the password reset token from the file or by cracking the hashed password.

Proof Of Concept

{{ read_file('/var/www/html/grav/user/accounts/riri.yaml') }}

Use the above Twig template syntax in a page and observe that the administrator riri's authentication details are exposed accessible by any unauthenticated user.

file-read-2-ATO

As an additional proof of concept for reading system files, observe the /etc/passwd file read using the following Twig syntax: {{ read_file('/etc/passwd') }}

file-read-etc-passwd

Impact

This can allow a low privileged user to perform a full account takeover of other registered users including Adminsitrators. This can also allow an adversary to read any file in the web server.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "getgrav/grav"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.7.46"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-34082"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-269"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-15T17:15:51Z",
    "nvd_published_at": "2024-05-15T17:15:12Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nA low privilege user account with page edit privilege can read any server files using Twig Syntax. This includes Grav user account files - /grav/user/accounts/*.yaml. This file stores hashed user password, 2FA secret, and the password reset token. This can allow an adversary to compromise any registered account by resetting a password for a user to get access to the password reset token from the file or by cracking the hashed password.\n\n### Proof Of Concept\n`{{ read_file(\u0027/var/www/html/grav/user/accounts/riri.yaml\u0027) }}`\n\nUse the above Twig template syntax in a page and observe that the administrator riri\u0027s authentication details are exposed accessible by any unauthenticated user. \n\n![file-read-2-ATO](https://github.com/getgrav/grav/assets/48800246/9dee4daa-f029-40dd-9646-94c794d3f254)\n\nAs an additional proof of concept for reading system files, observe the `/etc/passwd` file read using the following Twig syntax:\n`{{ read_file(\u0027/etc/passwd\u0027) }}`\n\n![file-read-etc-passwd](https://github.com/getgrav/grav/assets/48800246/e45de4d4-f81f-42cf-8466-aa36b225ca94)\n\n### Impact\nThis can allow a low privileged user to perform a full account takeover of other registered users including Adminsitrators. This can also allow an adversary to read any file in the web server.",
  "id": "GHSA-f8v5-jmfh-pr69",
  "modified": "2024-05-15T19:35:22Z",
  "published": "2024-05-15T17:15:51Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/getgrav/grav/security/advisories/GHSA-f8v5-jmfh-pr69"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34082"
    },
    {
      "type": "WEB",
      "url": "https://github.com/getgrav/grav/commit/b6bba9eb99bf8cb55b8fa8d23f18873ca594e348"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/getgrav/grav"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Grav Vulnerable to Arbitrary File Read to Account Takeover"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…