The Biosig Project libbiosig MFER Tag 63 parsing heap-based buffer overflow vulnerability
A heap-based buffer overflow exists in libbiosig's MFER parsing when a tag 63 frame encodes a channel number larger than the allocated channel array, allowing an out-of-bounds write. An attacker could supply a malicious MFER file to potentially achieve arbitrary code execution.
Originally disclosed on Cisco Talos
A heap-based buffer overflow vulnerability exists in the MFER parsing functionality of The Biosig Project libbiosig 3.9.0 and Master Branch (35a819fa). A specially crafted MFER file can lead to arbitrary code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code fails to validate the channel index (chan) against the size of the heap-allocated hdr->CHANNEL array before writing to it.
Impact
Depending on the heap setup, this flaw can potentially lead to arbitrary code execution.
What the attacker needed
Victim opens a malicious MFER file
The fix
The vendor released a patch on 2025-08-24, but the text does not describe the fix details.
How it was found
- Craft an MFER file with a tag 63 frame that encodes a channel number larger than the allocated channel array.
- Open the file with libbiosig, which triggers the parsing of the tag 63 frame.
- The parser reads the channel number and uses it as an index into hdr->CHANNEL without bounds checking.
- An out-of-bounds write occurs when storing the SPR value, leading to a heap buffer overflow.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a memory corruption bug in a library that reads medical signal files. When the library processes a file with a specially crafted channel number, it writes data past the end of an array, which can crash the program or let an attacker run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.