CVE-2024-45391: @tinacms/cli Tina Search Token Leak Vulnerability

HIGH
Advisory Identifier: GHSA-4qrm-9h4r-v2fx
CVSS 7.5
CWE-312 CWE-200
Published
Advisory Summary

CVE-2024-45391 is a HIGH (CVSS 7.5) tina search token leak vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting @tinacms/cli libraries in the npm ecosystem. The issue involves tina search token leak via lock file in tinacms. Remediation is available by upgrading affected packages to version 1.6.2.

CVE-2024-45391 at a Glance

CVE Identifier CVE-2024-45391
GHSA Identifier GHSA-4qrm-9h4r-v2fx
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product @tinacms/cli
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-2024-45391

To remediate this vulnerability, upgrade all affected @tinacms/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.

@tinacms/cli fixed: 1.6.2
npm install @tinacms/cli@1.6.2
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 @tinacms/cli

How to Check if You Are Affected

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

npm ls @tinacms/cli

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

Note: The npm ls @tinacms/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-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In @tinacms/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

### Impact Tina search token leaked via lock file (tina-lock.json) in TinaCMS. Sites building with @tinacms/cli < 1.6.2 that use a search token are impacted. If your Tina-enabled website has search setup, you should rotate that key immediately. ### Patches This issue has been patched in @tinacms/cli@1.6.2 ### Workarounds Upgrading, and rotating search token is required for the proper fix. ### References https://github.com/tinacms/tinacms/pull/4758

CVE-2024-45391 Affected @tinacms/cli Versions

1 component(s)
Fixed Versions:
1.6.2
Product / Package Ecosystem Affected Versions Fixed Version
@tinacms/cli
npm
< 1.6.2
1.6.2

References

Frequently Asked Questions

What is CVE-2024-45391?
CVE-2024-45391 is a security vulnerability in @tinacms/cli involving Tina search token leak via lock file in TinaCMS under CWE-312: Cleartext Storage of Sensitive Information.
Which @tinacms/cli versions are affected?
Affected versions include releases prior to 1.6.2 across affected packages: @tinacms/cli.
What version fixes CVE-2024-45391?
Upgrading to 1.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @tinacms/cli affected?
Yes, @tinacms/cli is affected in releases prior to 1.6.2. Upgrade your dependency to 1.6.2 or later.
What is the CVSS score of CVE-2024-45391?
CVE-2024-45391 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-45391?
CVE-2024-45391 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check npm dependencies for CVE-2024-45391?
Run the dependency tree command: 'npm ls @tinacms/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-4qrm-9h4r-v2fx",
  "modified" : "2024-09-03T21:45:34Z",
  "published" : "2024-09-03T19:41:59Z",
  "aliases" : [ "CVE-2024-45391" ],
  "summary" : "Tina search token leak via lock file in TinaCMS",
  "details" : "### Impact\nTina search token leaked via lock file (tina-lock.json) in TinaCMS. Sites building with @tinacms/cli < 1.6.2 that use a search token are impacted.\n\nIf your Tina-enabled website has search setup, you should rotate that key immediately.\n\n### Patches\nThis issue has been patched in @tinacms/cli@1.6.2\n\n### Workarounds\nUpgrading, and rotating search token is required for the proper fix.\n\n### References\nhttps://github.com/tinacms/tinacms/pull/4758\n",
  "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:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@tinacms/cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/security/advisories/GHSA-4qrm-9h4r-v2fx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45391"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/pull/4758"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/commit/110f1ceea4574d636a64526648f7c8bf6539b26a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinacms/tinacms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-312" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-03T19:41:59Z",
    "nvd_published_at" : "2024-09-03T20:15:08Z"
  }
}