{"id":2537,"cve":"CVE-2026-104266","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-104266\/","cwe":"CWE-835","cwe_number":835,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/835","cvss_score":6.5,"published":"2026-10-15","owasp":"A04 Insecure Design","odc":"Timing\/Serialization","cdc":"Timing Issues","category":"Resource Management","subcategory":"Resource Exhaustion","scope":"Local","impact":"Denial of Service (DoS)","summary":"Infinite loop in tinytag 2.0.0-2.3.0 when parsing crafted M4A atom, causing DoS.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-104266\/","description":"tinytag is a Python library for reading audio file metadata. From 2.0.0 until 2.3.0, an M4A file containing a sub-atom with a size of zero inside a ---- atom can cause the metadata parser to stop advancing through the input. The custom-field atom traversal repeatedly processes the malformed location, causing an infinite loop and denying service to a program that reads the crafted file. This issue is fixed in version 2.3.0.","solution":"Upgrade tinytag to version\u202f2.3.0 or later.","affected_component":"Python","fixed_by_upgrading":true,"vulnerable_code":"from tinytag import TinyTag\n\ndef extract_custom_fields(path):\n    \"\"\"\n    Open an M4A file and iterate over custom atoms.\n    Vulnerable to zero\u2011length sub\u2011atom causing an infinite loop.\n    \"\"\"\n    tag = TinyTag.get(path)\n    # VULNERABLE: infinite loop when a sub\u2011atom reports size 0\n    with open(path, \"rb\") as f:\n        f.seek(tag._audio_offset)          # start of atom list (simplified)\n        while True:\n            header = f.read(8)\n            if len(header) < 8:\n                break\n            atom_size = int.from_bytes(header[:4], \"big\")\n            # If atom_size is zero the file pointer is not advanced,\n            # causing the loop to repeat forever.\n            f.seek(atom_size - 8, 1)       # advance to next atom\n","patched_code":"from tinytag import TinyTag\n\ndef extract_custom_fields(path):\n    \"\"\"\n    Open an M4A file and iterate over custom atoms.\n    Fixed by refusing to process zero\u2011length atoms.\n    \"\"\"\n    tag = TinyTag.get(path)\n    # FIX: break loop when a sub\u2011atom reports size 0 to avoid infinite looping\n    with open(path, \"rb\") as f:\n        f.seek(tag._audio_offset)          # start of atom list (simplified)\n        while True:\n            header = f.read(8)\n            if len(header) < 8:\n                break\n            atom_size = int.from_bytes(header[:4], \"big\")\n            if atom_size == 0:\n                break                     # stop processing malformed atom\n            f.seek(atom_size - 8, 1)       # advance to next atom\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"tinytag\/tinytag","commit_url":"https:\/\/github.com\/tinytag\/tinytag\/commit\/9ada221ba44990cb02cd9002d992186e037b515e","commit_subject":"MP4: Refactor atom parsing (#326)","units":[{"file":"tinytag\/tinytag.py","function":null},{"file":"tinytag\/tinytag.py","function":"_MP4._data_parser"},{"file":"tinytag\/tinytag.py","function":"_MP4._nums_parser"},{"file":"tinytag\/tinytag.py","function":"_MP4._parse_cover_image"},{"file":"tinytag\/tinytag.py","function":"_MP4._parse_custom_field"},{"file":"tinytag\/tinytag.py","function":"_MP4._parse_id3v1_genre"},{"file":"tinytag\/tinytag.py","function":"_MP4._parse_uuid"},{"file":"tinytag\/tinytag.py","function":"_MP4._traverse_atoms"}]}],"references":null}