CVE-2026-78847 Details
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 vulnerability exists in gray-matter versions through 4.0.3, where the JavaScript engine in 'lib/engines.js' uses 'eval()' to execute front matter content labeled as 'js' or 'javascript'. This behavior, enabled by default, allows for arbitrary code execution. The issue arises because the library parses untrusted input without proper safeguards, executing potentially malicious code in the process.
Users can override the built-in JavaScript engine in gray-matter to disable the default 'eval()' execution. Alternatively, they can switch to the maintained fork '@11ty/gray-matter' version 2, which removes support for the JavaScript engine in front matter.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 21, 2026CISA-ADP
Assessed Sep 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/jonschlinkert/gray-matter/issues/182 | CISA-ADP | Issue TrackingVendor |
| https://blog.checo.cc/en/posts/Security/1 | [email protected] | ExploitRemedyTechnical Analysis |
| https://github.com/jonschlinkert/gray-matter/issues/112 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://github.com/jonschlinkert/gray-matter/issues/131 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://github.com/jonschlinkert/gray-matter/issues/182 | [email protected] | Issue TrackingVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-95 | Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| gray-matter | >= 4.0.0, < 4.0.4 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 22, 2026 | CVE Modified | CISA-ADP |
| Sep 21, 2026 | New CVE Received | [email protected] |
Volerion