CVE-2026-78847: Npm/gray-matter vulnerability

Published Sep 21, 2026
·
Updated

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.

Affected Software

1 affected component
npm/gray-matter=4.0.3

Event History

Sep 21, 2026
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·10:16 PM
Description

Frequently Asked Questions

1

When is an application exposed to arbitrary code execution?

An application is exposed when it uses gray-matter to parse front matter declared with the js or javascript language, because the affected engine evaluates that content with eval().

2

What input must an attacker control to exploit this issue?

The attacker needs the ability to supply or modify content whose front matter is parsed by gray-matter with language set to js or javascript. The provided information does not establish whether any particular application accepts such content from untrusted users by default.

3

Which versions are affected?

The issue is described as affecting all versions of gray-matter and was verified on version 4.0.3.

4

How can I identify potentially affected use in my environment?

Identify installations of the npm package gray-matter, then review whether they parse front matter using the js or javascript language. Such parsing reaches the JavaScript engine in lib/engines.js that uses eval().

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203