CVE-2025-68278: tinacms is vulnerable to arbitrary code execution
Summary uses the 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 package executes by default the code in the markdown file's front matter. 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.
Published Dec 18, 2025
Affected packages
tinacms
- Ecosystem
- npm
- Affected
- < 3.1.1
- Fixed in
- 3.1.1
- Check
npm ls tinacms
@tinacms/cli
- Ecosystem
- npm
- Affected
- < 2.0.4
- Fixed in
- 2.0.4
- Check
npm ls @tinacms/cli
@tinacms/graphql
- Ecosystem
- npm
- Affected
- < 2.0.3
- Fixed in
- 2.0.3
- Check
npm ls @tinacms/graphql
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 { "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.Credited to cristianstaicu.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-108259
Tina: Code injection via unescaped Git branch name in generated client source
high8.2Oct 9, 2026CVE-2026-108261
TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment
critical9.3Oct 9, 2026CVE-2026-63123
Tina: Cross-origin `POST /media/upload/*` requests can write arbitrary files into the Tina dev server media root
medium6.5Aug 19, 2026CVE-2026-54074
@tinacms/cli: Remote Code Execution in @tinacms/cli via Forestry migration — unsanitised __TINA_INTERNAL__ marker in user-controlled YAML labels
high7.8Jun 19, 2026CVE-2026-55660
TinaCMS: Cross-origin postMessage handlers and rich-text URL-sanitization bypass enable stored XSS and session takeover
high8.5Jun 19, 2026CVE-2026-55661
TinaCMS rich-text (slatejson) rendering does not sanitize link/image URLs, allowing stored XSS via dangerous URL schemes
medium4.8Jun 18, 2026
