CVE-2025-68278: tinacms vulnerable to arbitrary code execution

Published Dec 18, 2025
·
Updated

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.

Other sources

Tina is a headless content management system. In tinacms prior to version 3.1.1, 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. tinacms version 3.1.1, @tinacms/cli version 2.0.4, and @tinacms/graphql version 2.0.3 contain a fix for the issue.

MITRE

Affected Software

9 affected componentsFixes available
npm/tinacms<3.1.1
npm/@tinacms/cli<2.0.4
npm/@tinacms/graphql<2.0.3
npm/@tinacms/graphql<2.0.3
2.0.3
npm/@tinacms/cli<2.0.4
2.0.4
npm/tinacms<3.1.1
3.1.1
ssw Tinacms Node.js<3.1.1
ssw Tinacms\/cli Node.js<2.0.4
ssw Tinacms\/graphql Node.js<2.0.3

Event History

Dec 18, 2025
CVE Published
via MITRE·03:27 PM
Data Sourced
via MITRE·03:27 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
RemedyAffected Software
Advisory Published
via GitHub·06:45 PM
Data Sourced
via GitHub·06:45 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-68278?

CVE-2025-68278 has a high severity rating due to the potential for arbitrary code execution.

2

How do I fix CVE-2025-68278?

To fix CVE-2025-68278, upgrade to tinacms version 3.1.1 or later, or update the affected packages accordingly.

3

What causes CVE-2025-68278?

CVE-2025-68278 is caused by the insecure use of the gray-matter package in tinacms that allows code execution via controlled markdown content.

4

Which versions of tinacms are affected by CVE-2025-68278?

CVE-2025-68278 affects tinacms versions prior to 3.1.1, including certain versions of @tinacms/cli and @tinacms/graphql.

5

Can CVE-2025-68278 be exploited remotely?

Yes, CVE-2025-68278 can be exploited remotely by an attacker who can control the content of processed markdown files.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203