Categories
CVE-2026-107388 medium CVSS 6.2

Vulnerability in music-metadata (CVE-2026-107388)

Summary

Vulnerability in music-metadata (CVE-2026-107388). Risk of unauthorized operations or information disclosure. Exploitable via EndOfStreamError. Mitigation: upgrade to 11.16.0 or later.

Original description

The description as published by the source.

Summary

The ID3v2 parser in music-metadata trusts the tag size field without validation and allocates the full requested buffer before reading. A specially crafted MP3 file with a truncated ID3v2 tag can force allocation of up to 268 MB from a 10-byte file, causing server memory exhaustion. This vulnerability affects all parsers that support ID3v2 tags (MP3, FLAC, DSF, Musepack) and succeeds silently—callers don't see an error.


Details

Vulnerable Code Path:

  • lib/id3v2/ID3v2Token.ts:108 - Syncsafe size read without validation
  • lib/id3v2/ID3v2Parser.ts:122 - Full tag body allocated before reading
  • lib/id3v2/AbstractID3Parser.ts:22 - Allocation happens before stream validation

Root Cause:

The ID3v2 parser reads a syncsafe integer representing the tag size (maximum 268,435,455 bytes or 0x0FFFFFFF) and immediately allocates a buffer of that size without checking:

  1. If the tag size exceeds the remaining file size
  2. If the tag size exceeds a reasonable maximum
  3. If the subsequent read will actually succeed
// ID3v2Token.ts:108
const size = ID3v2Header.header.toSize(); // Trusts syncsafe size directly

// Later: Allocates without validation
const tagBody = await tokenizer.readBuffer(Buffer.alloc(size));
// If actual data < size, read fails but allocation succeeded

Attack Mechanism:

  1. File contains valid ID3v2 header with 10 bytes total
  2. ID3v2 size field claims 268,435,455 bytes (maximum syncsafe value)
  3. Parser allo…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

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-2026-107388 has been found in music-metadata.
Attackers can target a specific entry point like EndOfStreamError over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.2/10.
What to do: upgrade music-metadata to 11.16.0 or later.
If unsure, ask your IT team or search "music-metadata CVE-2026-107388" on the vendor's site.

CVE-2026-107388 (music-metadata) — CWE-789 / CVSS v3 6.2
Attack vector: local / unauthenticated / no user interaction
Attack surface: EndOfStreamError
Patched: 11.16.0 — apply immediately
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.

❓ What is the problem

A vulnerability (CWE-789) exists in music-metadata. Attackers reach the vulnerable code path via EndOfStreamError without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of music-metadata. Attack surface: EndOfStreamError.

🔥 Severity

Severity: Medium (CVSS 6.2/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 11.16.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'music-metadata' . 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

  1. 1
    Identify exposure identify
    grep -r 'music-metadata' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で music-metadata を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade music-metadata to 11.16.0

    ステージング環境で 11.16.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm music-metadata
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"11.16.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details