GHSA-529F-9QWM-9628
Vulnerability from github – Published: 2025-12-18 18:45 – Updated: 2025-12-18 18:45Summary
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
- Create a tinacms app using the cli/documentation:
npx create-tina-app@latest
- Modify one of the blog posts to contain the following front matter:
---js
{
"title": "Pawned" + console.log(require("fs").readFileSync("/etc/passwd").toString())
}
---
- Start the tinacms server, e.g., with
npm run dev - 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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "tinacms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@tinacms/cli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@tinacms/graphql"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-68278"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-18T18:45:41Z",
"nvd_published_at": "2025-12-18T16:15:57Z",
"severity": "HIGH"
},
"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\u0027s 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```\u0027s 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.",
"id": "GHSA-529f-9qwm-9628",
"modified": "2025-12-18T18:45:41Z",
"published": "2025-12-18T18:45:41Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "tinacms is vulnerable to arbitrary code execution"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.