CVE-2021-39131
JavaScript vulnerability analysis and mitigation

Overview

CVE-2021-39131 affects the ced package, which detects character encoding using Google's compact_enc_det library. The vulnerability was discovered and disclosed on August 17, 2021. The issue affects ced version 0.1.0, where passing data types other than Buffer causes the Node.js process to crash (GitHub Advisory).

Technical details

The vulnerability is classified as an Improper Handling of Unexpected Data Type (CWE-241) issue. It has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The vulnerability can be triggered remotely without requiring privileges or user interaction, primarily affecting system availability (NVD).

Impact

When exploited, this vulnerability results in a crash of the Node.js process, leading to a denial of service condition. The impact is particularly severe in scenarios where the library accepts data from untrusted sources over a network and passes it directly to ced (GitHub Advisory).

Exploitability

The vulnerability is easily exploitable by sending non-Buffer data types to an application using the affected version of ced. A proof of concept exists demonstrating exploitation through a simple HTTP POST request to a server using the vulnerable library (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in ced version 1.0.0. Users can upgrade from v0.1.0 without any breaking changes. As a workaround, before passing an argument to ced, developers can verify it's a Buffer using Buffer.isBuffer(obj) (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-77415CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77414CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77413CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-63421HIGH7.5
  • JavaScript logoJavaScript
  • @keystone-6/core
NoYesAug 21, 2026
CVE-2026-53509MEDIUM5.7
  • JavaScript logoJavaScript
  • @aborruso/ckan-mcp-server
NoYesAug 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management