All reports
High

gray-matter: gray-matter: arbitrary code execution via eval in front matter parsing

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-78847

Probability of exploitation in the next 30 days: 0.60%

FIRST EPSS · 2026-11-20

Description

An issue in gray-matter All versions (verified on 4.0.3) allows the JavaScript engine in lib/engines.js using eval() to parse front matter when language is js/javascript.This allows arbitrary code execution.

A flaw was found in gray-matter. The component uses the eval() function to parse document metadata (front matter) specified as JavaScript. An attacker who supplies malicious input containing JavaScript front matter can exploit this behavior to achieve arbitrary code execution on the target system.