CVE-2022-25377: Appwrite/server ce Path Traversal Vulnerability
HIGHCVE-2022-25377 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Appwrite/server ce libraries in the Packagist ecosystem. The issue involves appwrite directory traversal vulnerability. Remediation is available by upgrading affected packages to version 0.12.2.
CVE-2022-25377 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-25377
To remediate this vulnerability, upgrade all affected Appwrite/server ce 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 appwrite/server-ce to 0.12.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for appwrite/server-ce
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-25377, inspect your project dependencies for Appwrite/server ce:
inspect dependencies for appwrite/server-ce
Analyze the terminal output to locate any version of Appwrite/server ce in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.2), 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 Appwrite/server ce, 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-2022-25377 Affected Appwrite/server ce Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
appwrite/server-ce
|
Packagist |
≥ 0.5.0
< 0.12.2
|
0.12.2
|
References
Frequently Asked Questions
What is CVE-2022-25377?
Which Appwrite/server ce versions are affected?
What version fixes CVE-2022-25377?
Is appwrite/server-ce affected?
What is the CVSS score of CVE-2022-25377?
What CWE is associated with CVE-2022-25377?
How can I check Packagist dependencies for CVE-2022-25377?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wfm3-gq9h-mrjm",
"modified" : "2024-08-21T21:46:24Z",
"published" : "2024-02-23T00:30:33Z",
"aliases" : [ "CVE-2022-25377" ],
"summary" : "Appwrite Directory Traversal vulnerability",
"details" : "The ACME-challenge endpoint in Appwrite 0.5.0 through 0.12.x before 0.12.2 allows remote attackers to read arbitrary local files via ../ directory traversal. In order to be vulnerable, `APP_STORAGE_CERTIFICATES/.well-known/acme-challenge` must exist on disk. (This pathname is automatically created if the user chooses to install Let's Encrypt certificates via Appwrite.)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "appwrite/server-ce"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "0.12.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25377"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/pull/2780"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/commit/892f6fa4ba0d44e2435ffad1a84542400cfb7a9b"
}, {
"type" : "WEB",
"url" : "https://dubell.io/unauthenticated-lfi-in-appwrite-0.5.0-0.12.1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/appwrite/appwrite"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/blob/0.12.0/app/controllers/general.php#L539"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/releases/tag/0.12.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-23T17:45:23Z",
"nvd_published_at" : "2024-02-22T22:15:47Z"
}
}