tinacms is vulnerable to arbitrary code execution
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
- Create a tinacms app using the cli/documentation:
npx create-tina-app@latest
- Modify one of the blog posts to contain the following front matter:
---js
{
"title": "Pawned" + console.log(require("fs").readFileSync("/etc/passwd").toString())
}
---
- Start the tinacms server, e.g., with
npm run dev - 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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | tinacms | < 3.1.1 | 3.1.1 |
| Paquete de npm | @tinacms/cli | < 2.0.4 | 2.0.4 |
| Paquete de npm | @tinacms/graphql | < 2.0.3 | 2.0.3 |
Referencias
- Vector CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P- Debilidad (CWE)
CWE-94- Plataforma
- npm
- Paquete
tinacms, @tinacms/cli, @tinacms/graphql- Publicada
- 18.12.2025
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-529f-9qwm-9628 - CC BY 4.0
Historial de vulnerabilidades: @tinacms/cli
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 9
- Primera → última
- 02.2023 10.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Crítica 1
- Alta 6
- Media 2
Divulgaciones por año
- 2023: 1
- 2024: 1
- 2025: 1
- 2026: 6
-
tinacms is vulnerable to arbitrary code execution esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.