tinacms
Affected
- introduced
0, fixed3.1.1(semver)
Fixed versions
3.1.1
Fix
- Fixed version
3.1.1npm install [email protected]
Advisory
Also known as: CVE-2025-68278
tinacms is vulnerable to arbitrary code execution
Summary
### 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())
}
---
npm run devImpact
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.
High Basis: The source's own band: HIGH
0, fixed 3.1.1 (semver)3.1.1
3.1.1npm install [email protected]0, fixed 2.0.4 (semver)2.0.4
2.0.4npm install @tinacms/[email protected]0, fixed 2.0.3 (semver)2.0.3
2.0.3npm install @tinacms/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0