CVE-2025-68278
Arbitrary Code Execution via Insecure Markdown Parsing in TinaCMS
Publication date: 2025-12-18
Last updated on: 2026-04-10
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| ssw | tinacms | to 3.1.1 (exc) |
| ssw | tinacms/cli | to 2.0.4 (exc) |
| ssw | tinacms/graphql | to 2.0.3 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in tinacms prior to version 3.1.1 involves insecure use of the gray-matter package to parse front matter in markdown files. Attackers who can control the content of these markdown files, such as blog posts, can embed arbitrary JavaScript or CoffeeScript code in the front matter sections. When tinacms processes these files, it executes this code on the server, leading to remote code execution. The vulnerability arises because tinacms did not disable the execution of JavaScript and CoffeeScript in front matter, allowing malicious code to run. The fix disables parsing and stringifying of front matter using JavaScript or CoffeeScript engines, throwing explicit security errors and only allowing safe formats like YAML, TOML, and JSON. [1, 2]
How can this vulnerability impact me? :
This vulnerability can lead to a complete compromise of the hosting server. If an attacker can control markdown files processed by tinacms, they can embed arbitrary JavaScript code in the front matter that will be executed on the server. This can allow attackers to read sensitive files, execute arbitrary commands, and take full control of the server. It is especially dangerous when markdown files are contributed by external contractors or third parties without proper validation, as developers may not expect executable code in markdown content. [2]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection involves checking markdown files processed by tinacms for frontmatter sections using JavaScript or CoffeeScript delimiters such as ---js, ---javascript, ---coffee, or ---coffeescript. Since these delimiters are now disallowed, scanning your content repository for these delimiters can help identify vulnerable files. For example, you can use the following command to find such files in your content directory: `grep -rlE '^---(js|javascript|coffee|coffeescript)' /path/to/markdown/files`. Additionally, monitoring server logs for unexpected execution or errors related to frontmatter parsing may help detect exploitation attempts. [1, 2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include upgrading affected packages to the fixed versions: tinacms to version 3.1.1, @tinacms/cli to version 2.0.4, and @tinacms/graphql to version 2.0.3. Additionally, migrate any markdown files using JavaScript or CoffeeScript frontmatter delimiters (---js, ---javascript, ---coffee, ---coffeescript) to safe frontmatter formats such as YAML, TOML, or JSON. This prevents execution of arbitrary code embedded in frontmatter. Also, restrict or validate markdown content contributions from untrusted sources to prevent malicious code injection. [1, 2]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows attackers to execute arbitrary code on the server by controlling markdown file content, potentially leading to unauthorized access or data breaches. Such security incidents could result in non-compliance with standards and regulations like GDPR or HIPAA, which require protection of sensitive data and secure processing environments. Therefore, if exploited, this vulnerability could negatively impact compliance with these regulations due to the risk of data exposure or system compromise. [2]