Vulnerability in ced (CVE-2021-39131)
Summary
Vulnerability in ced (CVE-2021-39131). Risk of unauthorized operations or information disclosure. Exploitable via Buffer. Mitigation: upgrade to 1.0.0 or later.
Original description
The description as published by the source.
Impact
In ced v0.1.0, passing data types other than Buffer causes the Node.js process to crash.
Patches
The problem has been patched in ced v1.0.0. You can upgrade from v0.1.0 without any breaking changes.
Workarounds
Before passing an argument to ced, verify it’s a Buffer using Buffer.isBuffer(obj).
CVSS score
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/RL:O/RC:C
Base Score: 7.5 (High)
Temporal Score: 7.2 (High)
Since ced is a library, the scoring is based on the “reasonable worst-case implementation scenario”, namely, accepting data from untrusted sources over a network and passing it directly to ced. Depending on your specific implementation, the vulnerability’s severity in your program may be different.
Proof of concept
const express = require("express");
const bodyParser = require("body-parser");
const ced = require("ced");
const app = express();
app.use(bodyParser.raw());
app.post("/", (req, res) => {
const encoding = ced(req.body);
res.end(encoding);
});
app.listen(3000);
curl --request POST --header "Content-Type: text/plain" --data foo http://localhost:3000 crashes the ser…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2021-39131 has been found in ced.
Attackers can target a specific entry point like Buffer over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade ced to 1.0.0 or later.
If unsure, ask your IT team or search "ced CVE-2021-39131" on the vendor's site.
CVE-2021-39131 (ced) — CWE-241
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: Buffer
Patched: 1.0.0 — apply immediately
Workaround: Before passing an argument to ced, verify it’s a Buffer using Buffer.isBuffer(obj).
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-241) exists in ced. Attackers reach the vulnerable code path via Buffer without authentication.
Check the vendor advisory for the affected versions of ced. Attack surface: Buffer.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 1.0.0.
Workaround: Before passing an argument to ced, verify it’s a Buffer using Buffer.isBuffer(obj).
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'ced' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'ced' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
cedを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Before passing an argument to ced, verify it’s a `Buffer` using [`Buffer.isBuffer(obj)`](https://nodejs.org/api/buffer.html#buffer_static_method_buffer_isbuffer_obj).パッチが適用されるまでの応急処置として、Before passing an argument to ced, verify it’s a
BufferusingBuffer.isBuffer(obj). を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade ced to 1.0.0ステージング環境で 1.0.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com