GHSA-43hj-fxwj-49qw

Suggest an improvement
Source
https://github.com/advisories/GHSA-43hj-fxwj-49qw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-43hj-fxwj-49qw/GHSA-43hj-fxwj-49qw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-43hj-fxwj-49qw
Aliases
Published
2026-08-18T20:16:29Z
Modified
2026-08-18T20:30:07Z
Severity
  • 5.9 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
membrane_mp4_plugin has an unauthenticated denial-of-service via BEAM atom table exhaustion
Details

Summary

membrane_mp4_plugin interns every 4-byte MP4 box name as a BEAM atom while parsing container headers, with no validation against an allow-list. Any code path that calls Membrane.MP4.Container.parse/1 (or the bang variant) on attacker-controlled MP4 bytes can be made to exhaust the BEAM atom table, which is uncapped at the source but bounded by the runtime ceiling (around 1,048,576 atoms) and never garbage-collected. Once the ceiling is hit, the entire BEAM node aborts.

Details

The MP4 container parser walks the input stream box-by-box. For each box, Membrane.MP4.Container.Header.parse/1 in lib/membrane_mp4/container/header.ex extracts the 4-byte name field and delegates to the private helper parse_box_name/1, which trims trailing spaces and passes the bytes through String.to_atom/1. Because String.to_atom/1 creates a new atom unconditionally, every distinct attacker-chosen 4-byte sequence becomes a permanent allocation in the global atom table. Atoms are not subject to garbage collection, so unique names accumulate for the lifetime of the node.

The fix replaces the unsafe interning with String.to_existing_atom/1 and treats unknown names as the :unknown atom downstream (with related plumbing in parse_helper.ex, serialize_helper.ex, and the ISOM/CMAF demuxer engines so the new error variant flows through cleanly).

PoC

  1. Generate an MP4-shaped payload of roughly 1.1 million minimal box headers, each 8 bytes long (4-byte size of 8, followed by a unique 4-byte ASCII name produced by enumerating combinations in the printable range).
  2. Concatenate them into a single binary (~8 MB total).
  3. Call Membrane.MP4.Container.parse!/1 on the binary inside any process running under the target BEAM node.
  4. The node aborts once the atom table ceiling is reached.

Impact

An attacker who can get a single crafted MP4 file in front of any system that demuxes user-supplied media with membrane_mp4_plugin can crash the entire BEAM node hosting that pipeline, taking down every Erlang/Elixir application sharing the runtime. No authentication, network position, or user interaction is required beyond delivering the file to whatever processing path eventually calls the parser.

References

Database specific
{
    "cwe_ids":  [
        "CWE-770"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-18T20:16:29Z",
    "nvd_published_at":  "2026-06-11T12:16:31Z",
    "severity":  "MODERATE"
}
References

Affected packages

Hex / membrane_mp4_plugin

Package

Name
membrane_mp4_plugin
Purl
pkg:hex/membrane_mp4_plugin

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.36.7

Affected versions

0.*
0.3.0
0.4.0
0.5.0
0.6.0
0.7.0
0.8.0
0.9.0
0.10.0
0.11.0
0.12.0
0.12.1
0.13.0
0.14.0
0.15.0
0.16.0
0.16.1
0.16.2
0.17.0
0.18.0
0.18.1
0.19.0
0.20.0
0.21.0
0.22.0
0.22.1
0.22.2
0.22.3
0.23.0
0.24.0
0.24.1
0.25.0
0.26.0
0.26.1
0.27.0
0.28.0
0.28.1
0.29.0
0.29.1
0.30.0
0.30.1
0.30.2
0.31.0
0.32.0
0.33.0
0.33.1
0.34.0
0.34.1
0.34.2
0.35.0
0.35.1
0.35.2
0.35.3
0.36.0
0.36.1
0.36.2
0.36.3
0.36.4
0.36.5
0.36.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-43hj-fxwj-49qw/GHSA-43hj-fxwj-49qw.json"