CVE-2025-68278: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-68278 is a code injection vulnerability in TinaCMS, a headless content management system, that allows attackers who can control the content of processed markdown files to execute arbitrary code on the server. It affects tinacms prior to version 3.1.1, @tinacms/cli prior to version 2.0.4, and @tinacms/graphql prior to version 2.0.3. The vulnerability was disclosed on December 18, 2025. It carries a CVSS v3.1 base score of 8.8 (High) and a CVSS v4.0 base score of 7.3 (High) (Github Advisory, TinaCMS Advisory).

Technical details

The root cause is improper control of code generation (CWE-94) stemming from TinaCMS's insecure use of the gray-matter npm package. By default, gray-matter executes JavaScript (and CoffeeScript) code embedded in markdown frontmatter delimited by ---js, ---javascript, ---coffee, or ---coffeescript blocks. TinaCMS failed to override this behavior by providing a custom engine property in the gray-matter options object to disable code execution. An attacker who can place a malicious markdown file into the TinaCMS content directory — for example, a blog post — can embed arbitrary JavaScript in the frontmatter that executes server-side when the file is parsed (TinaCMS Advisory, Patch Commit).

Impact

Successful exploitation results in full remote code execution (RCE) on the server hosting TinaCMS, running as the Node.js process user. An attacker can read sensitive files (e.g., /etc/passwd, environment variables, secrets), modify data, disrupt service availability, and potentially pivot laterally within the hosting infrastructure. The impact is rated High across confidentiality, integrity, and availability (TinaCMS Advisory, Github Advisory).

Exploitability

A proof-of-concept exploit is publicly available in the GitHub security advisory, demonstrating file read via require('fs').readFileSync('/etc/passwd') embedded in markdown frontmatter (TinaCMS Advisory). There is no evidence of active in-the-wild exploitation at this time, and no threat actor attribution has been reported. The EPSS score is approximately 0.069% (21st percentile), indicating a currently low probability of exploitation in the next 30 days (Github Advisory). The vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to have some ability to introduce or modify markdown content files processed by TinaCMS (e.g., via a contractor, shared folder, or compromised content pipeline), plus passive user interaction (a developer starting the server).

Exploitation steps

  1. Identify a target: Locate a TinaCMS deployment running tinacms < 3.1.1, @tinacms/cli < 2.0.4, or @tinacms/graphql < 2.0.3 where the attacker can introduce or modify markdown content files (e.g., blog posts in the content directory).
  2. Craft a malicious markdown file: Create or modify a .md file to include a JavaScript frontmatter block using the ---js delimiter with an arbitrary payload:
---js
{
  "title": "Pawned" + console.log(require("fs").readFileSync("/etc/passwd").toString())
}
---
# Blog Post
Content here
  1. Deliver the file: Place the malicious markdown file into the TinaCMS content directory via any available vector — email attachment to a developer, shared cloud folder upload, direct repository commit, or CMS content interface access.
  2. Trigger parsing: Wait for or cause a developer/administrator to start or restart the TinaCMS server (e.g., npm run dev), which triggers gray-matter to parse the frontmatter and execute the embedded JavaScript.
  3. Achieve code execution: The injected JavaScript runs server-side as the Node.js process, enabling file exfiltration, reverse shell establishment, credential theft, or further lateral movement (TinaCMS Advisory, Github Advisory).

Indicators of compromise

  • File System: Markdown files in the TinaCMS content directory containing ---js, ---javascript, ---coffee, or ---coffeescript frontmatter delimiters instead of standard YAML (---) or TOML (+++) delimiters; unexpected files created or modified by the Node.js process (e.g., web shells, exfiltrated data files).
  • Logs: Node.js/TinaCMS server console output containing unexpected data such as file contents (e.g., /etc/passwd output), error stack traces from gray-matter parsing, or unusual output during server startup.
  • Process: Unexpected child processes spawned by the Node.js TinaCMS process (e.g., sh, bash, curl, wget, python) indicating command execution from within the server.
  • Network: Unexpected outbound connections from the TinaCMS server to external IPs, particularly during server startup or content parsing, which may indicate reverse shell or data exfiltration activity (TinaCMS Advisory).

Mitigation and workarounds

Upgrade to the following patched versions immediately: tinacms 3.1.1, @tinacms/cli 2.0.4, and @tinacms/graphql 2.0.3. The fix overrides the gray-matter matterEngines configuration to throw explicit errors when JavaScript (js, javascript) or CoffeeScript (coffee, coffeescript) frontmatter engines are invoked, while preserving support for YAML, TOML, and JSON formats (Patch Commit). As a workaround prior to patching, restrict write access to the TinaCMS content directory to trusted users only, and audit existing markdown files for ---js, ---javascript, ---coffee, or ---coffeescript frontmatter blocks. Implement input validation and sanitization for any externally sourced markdown content before it enters the content pipeline (TinaCMS Advisory).

Community reactions

The vulnerability was reported by security researcher cristianstaicu and published by the TinaCMS maintainer wicksipedia on December 18, 2025. The advisory notes that developers may be unaware that processing untrusted markdown files via TinaCMS can result in server-side code execution, highlighting a broader supply-chain and content-pipeline trust assumption risk (TinaCMS Advisory). Coverage has appeared on security aggregators including INCIBE-CERT and Red Hat's CVE tracking, indicating moderate community awareness (Github Advisory).

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-966w-4vpf-p7hcHIGH7.1
  • JavaScript logoJavaScript
  • @aloma.io/aloma
NoYesOct 25, 2026
GHSA-mrwp-f3q8-3g9pMEDIUM5.9
  • JavaScript logoJavaScript
  • follow-redirects
NoYesOct 25, 2026
GHSA-hfm3-x63j-7fxpHIGHN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/migrate
NoYesOct 25, 2026
GHSA-6244-vvv9-76f5MEDIUMN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/plugin
NoYesOct 25, 2026
GHSA-q53q-qg98-p9jfHIGHN/A
  • JavaScript logoJavaScript
  • llm-fw
NoYesOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management