CVE-2024-34082: Getgrav/grav Grav Vulnerable To Arbitrary File Vulnerability
HIGHCVE-2024-34082 is a HIGH (CVSS 8.5) grav vulnerable to arbitrary file vulnerability (CWE-269: Improper Privilege Management) affecting Getgrav/grav libraries in the Packagist ecosystem. The issue involves grav vulnerable to arbitrary file read to account takeover. Remediation is available by upgrading affected packages to version 1.7.46.
CVE-2024-34082 at a Glance
Security Impact
CVSS: 8.5
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:C/C:H/I:N/A:L).
How to Fix CVE-2024-34082
To remediate this vulnerability, upgrade all affected Getgrav/grav dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getgrav/grav to 1.7.46
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getgrav/grav
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-34082, inspect your project dependencies for Getgrav/grav:
inspect dependencies for getgrav/grav
Analyze the terminal output to locate any version of Getgrav/grav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.46), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Getgrav/grav, 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
CVE-2024-34082 Affected Getgrav/grav Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getgrav/grav
|
Packagist |
< 1.7.46
|
1.7.46
|
References
Frequently Asked Questions
What is CVE-2024-34082?
Which Getgrav/grav versions are affected?
What version fixes CVE-2024-34082?
Is getgrav/grav affected?
What is the CVSS score of CVE-2024-34082?
What CWE is associated with CVE-2024-34082?
How can I check Packagist dependencies for CVE-2024-34082?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f8v5-jmfh-pr69",
"modified" : "2024-05-15T19:35:22Z",
"published" : "2024-05-15T17:15:51Z",
"aliases" : [ "CVE-2024-34082" ],
"summary" : "Grav Vulnerable to Arbitrary File Read to Account Takeover",
"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('/var/www/html/grav/user/accounts/riri.yaml') }}`\n\nUse the above Twig template syntax in a page and observe that the administrator riri's authentication details are exposed accessible by any unauthenticated user. \n\n\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('/etc/passwd') }}`\n\n\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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getgrav/grav"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.46"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-269" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T17:15:51Z",
"nvd_published_at" : "2024-05-15T17:15:12Z"
}
}