Junglewise Threat Intelligence

CVE-2025-68278: TinaCMS arbitrary code execution in markdown frontmatter

CVE-2025-68278 · Severity: medium · CVSS 4 · Published 2025-12-18

Executive brief

TinaCMS is an open-source headless CMS that processes markdown files for content management. The application insecurely handles markdown frontmatter parsing, allowing attackers who can control markdown file content (such as blog posts or uploaded files) to execute arbitrary JavaScript code on the server, resulting in complete system compromise.

Technical details

TinaCMS uses the gray-matter package to parse markdown files but fails to disable the insecure default behavior of executing JavaScript and CoffeeScript code embedded in frontmatter delimiters (---js, ---javascript, ---coffee). An attacker who can control markdown file content (e.g., via file upload, email-delivered contractor files, or shared cloud folders) can inject malicious JavaScript code in the frontmatter that will be executed server-side when the file is processed. This leads to remote code execution with the privileges of the TinaCMS server process. The vulnerability affects tinacms < 3.1.1, @tinacms/cli < 2.0.4, and @tinacms/graphql < 2.0.3. Patches are available that disable JavaScript and CoffeeScript engine execution while preserving support for safe formats (YAML, TOML, JSON).

Affected products

  • TinaCMS tinacms < 3.1.1
  • TinaCMS @tinacms/cli < 2.0.4
  • TinaCMS @tinacms/graphql < 2.0.3

Timeline

  • 2025-12-18: disclosed: Advisory published
  • 2025-12-18: patched: Security patches released: tinacms 3.1.1, @tinacms/cli 2.0.4, @tinacms/graphql 2.0.3

References

Related threats