CVE-2025-68278: Tinacms Tinacms Is Vulnerable To Arbitrary Vulnerability

HIGH
Advisory Identifier: GHSA-529f-9qwm-9628
CWE-94
Published
Advisory Summary

CVE-2025-68278 is a HIGH tinacms is vulnerable to arbitrary vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Tinacms libraries in the npm ecosystem. The issue involves tinacms is vulnerable to arbitrary code execution. Remediation is available by upgrading affected packages to version 3.1.1, 2.0.4, 2.0.3.

CVE-2025-68278 at a Glance

CVE Identifier CVE-2025-68278
GHSA Identifier GHSA-529f-9qwm-9628
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Tinacms
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-68278

To remediate this vulnerability, upgrade all affected Tinacms 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 fixed: 3.1.1
npm install tinacms@3.1.1
@tinacms/cli fixed: 2.0.4
npm install @tinacms/cli@2.0.4
@tinacms/graphql fixed: 2.0.3
npm install @tinacms/graphql@2.0.3
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

How to Check if You Are Affected

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

npm ls tinacms

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

Note: The npm ls tinacms 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Tinacms, 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

### Summary ```tinacms``` uses the ```gray-matter``` package in an insecure way allowing attackers that can control the content of the processed markdown files, e.g., blog posts, to execute arbitrary code. ### Details The ```gray-matter``` package executes by default the code in the markdown file's front matter. ```tinacms``` does not change this behavior when process markdown file, e.g., by passing a custom engine property for js/javascript in the options object. ### PoC 1. Create a tinacms app using the cli/documentation: ``` npx create-tina-app@latest ``` 2. Modify one of the blog posts to contain the following front matter: ```js ---js { "title": "Pawned" + console.log(require("fs").readFileSync("/etc/passwd").toString()) } --- ``` 3. Start the tinacms server, e.g., with ```npm run dev``` 4. Observe the console of the server printing the password file, showing that attackers can execute arbitrary commands. ### Impact RCE: attackers can execute arbitrary JavaScript code on the server hosting tinacms. ### Feasibility Potential attack scenarios can be executed like this: Companies often have technical writers as contractors. These contractors produce md files, which they send over email or upload in a shared cloud folder. Developers download these files and upload them in ```tinacms```'s content folder. While this example might appear speculative or contrived, a general observation is that developers would be very surprised to find out that processing untrusted markdown files via ```tinacms``` = server-side code execution = complete machine take over. That is, ```tinacms``` users might not expect markdown files to contain anything else than data and ```gray-matter``` violates that assumption.

CVE-2025-68278 Affected Tinacms Versions

3 component(s)
Fixed Versions:
3.1.12.0.42.0.3
Product / Package Ecosystem Affected Versions Fixed Version
tinacms
npm
< 3.1.1
3.1.1
@tinacms/cli
npm
< 2.0.4
2.0.4
@tinacms/graphql
npm
< 2.0.3
2.0.3

References

Frequently Asked Questions

What is CVE-2025-68278?
CVE-2025-68278 is a security vulnerability in Tinacms involving tinacms is vulnerable to arbitrary code execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Tinacms versions are affected?
Affected versions include releases prior to 3.1.1, 2.0.4, 2.0.3 across affected packages: tinacms, @tinacms/cli, @tinacms/graphql.
What version fixes CVE-2025-68278?
Upgrading to 3.1.1, 2.0.4, 2.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tinacms affected?
Yes, tinacms is affected in releases prior to 3.1.1. Upgrade your dependency to 3.1.1 or later.
Is @tinacms/cli affected?
Yes, @tinacms/cli is affected in releases prior to 2.0.4. Upgrade your dependency to 2.0.4 or later.
What CWE is associated with CVE-2025-68278?
CVE-2025-68278 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for CVE-2025-68278?
Run the dependency tree command: 'npm ls tinacms'. 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-529f-9qwm-9628",
  "modified" : "2025-12-18T18:45:41Z",
  "published" : "2025-12-18T18:45:41Z",
  "aliases" : [ "CVE-2025-68278" ],
  "summary" : "tinacms is vulnerable to arbitrary code execution",
  "details" : "### Summary\n```tinacms``` uses the ```gray-matter``` package in an insecure way allowing attackers that can control the content of the processed markdown files, e.g., blog posts, to execute arbitrary code.\n\n### Details\nThe ```gray-matter``` package executes by default the code in the markdown file's front matter. ```tinacms``` does not change this behavior when process markdown file, e.g., by passing a custom engine property for js/javascript in the options object.\n\n### PoC\n1. Create a tinacms app using the cli/documentation: \n```\nnpx create-tina-app@latest\n```\n2. Modify one of the blog posts to contain the following front matter:\n```js\n---js\n{\n  \"title\": \"Pawned\" + console.log(require(\"fs\").readFileSync(\"/etc/passwd\").toString())\n}\n---\n```\n3. Start the tinacms server, e.g., with ```npm run dev```\n4. Observe the console of the server printing the password file, showing that attackers can execute arbitrary commands. \n\n### Impact\nRCE: attackers can execute arbitrary JavaScript code on the server hosting tinacms.\n\n### Feasibility\nPotential attack scenarios can be executed like this: Companies often have technical writers as contractors. These contractors produce md files, which they send over email or upload in a shared cloud folder. Developers download these files and upload them in ```tinacms```'s content folder. While this example might appear speculative or contrived, a general observation is that developers would be very surprised to find out that processing untrusted markdown files via ```tinacms``` = server-side code execution = complete machine take over. That is, ```tinacms``` users might not expect markdown files to contain anything else than data and ```gray-matter``` violates that assumption.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tinacms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@tinacms/cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@tinacms/graphql"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/security/advisories/GHSA-529f-9qwm-9628"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-68278"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/commit/fa7c27abef968e3f3a3e7d564f282bc566087569"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinacms/tinacms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-18T18:45:41Z",
    "nvd_published_at" : "2025-12-18T16:15:57Z"
  }
}