Vulnerabilities in pkg:pypi/appwrite

PACKAGE
Advisory Identifier: GHSA-g777-crp9-m27g
Advisory Summary

CVE-2023-50974 is a MODERATE (CVSS 5.5) apprite cli makes use of vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Appwrite cli libraries in the npm ecosystem. The issue involves apprite cli makes use of hard-coded credentials. Remediation is available by upgrading affected packages to version 3.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/appwrite

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/appwrite. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g777-crp9-m27g CVE-2023-50974 MODERATE Apprite CLI makes Use of Hard-coded Credentials

CVE-2023-50974 at a Glance

CVE Identifier CVE-2023-50974
GHSA Identifier GHSA-g777-crp9-m27g
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Appwrite cli
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2023-50974

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

appwrite-cli fixed: 3.0.0
npm install appwrite-cli@3.0.0
appwrite fixed: 3.0.0
pip install appwrite>=3.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls appwrite-cli

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-50974, inspect your project dependencies using npm:

npm ls appwrite-cli

Analyze the terminal output to locate any version of Appwrite cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.

Note: The npm ls appwrite-cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Appwrite cli, 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

In Appwrite CLI before 3.0.0, when using the login command, the credentials of the Appwrite user are stored in a ~/.appwrite/prefs.json file with 0644 as UNIX permissions. Any user of the local system can access those credentials.

CVE-2023-50974 Affected Appwrite cli Versions

2 component(s)
Fixed Versions:
3.0.0
Product / Package Ecosystem Affected Versions Fixed Version
appwrite-cli
npm
< 3.0.0
3.0.0
appwrite
PyPI
< 3.0.0
3.0.0

References

Frequently Asked Questions

What is CVE-2023-50974?
CVE-2023-50974 is a security vulnerability in Appwrite cli involving Apprite CLI makes Use of Hard-coded Credentials under CWE-798: Use of Hard-coded Credentials.
Which Appwrite cli versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: appwrite-cli, appwrite.
What version fixes CVE-2023-50974?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is appwrite-cli affected?
Yes, appwrite-cli is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
Is appwrite affected?
Yes, appwrite is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What is the CVSS score of CVE-2023-50974?
CVE-2023-50974 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-50974?
CVE-2023-50974 is classified under CWE-798: Use of Hard-coded Credentials (The product contains hard-coded credentials, such as a password or cryptographic key.).
How can I check npm dependencies for CVE-2023-50974?
Run the dependency tree command: 'npm ls appwrite-cli'. 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-g777-crp9-m27g",
  "modified" : "2024-09-13T14:15:59Z",
  "published" : "2024-01-09T09:30:29Z",
  "aliases" : [ "CVE-2023-50974" ],
  "summary" : "Apprite CLI makes Use of Hard-coded Credentials",
  "details" : "In Appwrite CLI before 3.0.0, when using the login command, the credentials of the Appwrite user are stored in a ~/.appwrite/prefs.json file with 0644 as UNIX permissions. Any user of the local system can access those credentials.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "appwrite-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "appwrite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50974"
  }, {
    "type" : "WEB",
    "url" : "https://appwrite.io/docs/tooling/command-line/installation"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/SkypLabs/72ee00ecfa7d1a3494e2d69a24279c1d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/appwrite/sdk-for-cli"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/appwrite/PYSEC-2024-2.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-798" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-12T23:19:29Z",
    "nvd_published_at" : "2024-01-09T09:15:42Z"
  }
}