Skip to content
Memory corruption Advisory Advanced CVE-2025-54481CVE-2025-54491CVE-2025-54482CVE-2025-54493CVE-2025-54487CVE-2025-54489CVE-2025-54490CVE-2025-54483CVE-2025-54486CVE-2025-54485CVE-2025-54488CVE-2025-54494CVE-2025-54480CVE-2025-54492CVE-2025-54484

The Biosig Project libbiosig MFER unvalidated length stack-based buffer overflow vulnerability

The MFER file parser in libbiosig reads a length field from the file and then copies that many bytes into fixed-size stack buffers without checking the destination size. An attacker can supply a crafted MFER file to overflow the stack and potentially execute arbitrary code.

Mark Bereza Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

A stack-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.

Mark Bereza and Lilith >_>, on Cisco Talos

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 parser reads an attacker-controlled length from the MFER file and passes it to a read into a fixed-size stack buffer without validating that the length fits the buffer.

Impact

An attacker could write arbitrary data past the end of a stack buffer, potentially leading to arbitrary code execution.

What the attacker needed

Victim opens a crafted MFER file

How it was found

  1. Craft an MFER file whose header matches the MFER magic bytes.
  2. Encode a data length using multiple octets so the decoded length exceeds the buffer size.
  3. Set the tag to a value whose handler reads that length into a stack buffer.
  4. Open the file with libbiosig to trigger the 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.

A stack buffer is a small fixed-size area of memory a program uses for temporary data. The program trusts a length value written in the file and copies that many bytes into the small area, so a large length spills over into nearby memory. This can crash the program or let an attacker control what it does next.

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.

More by Mark Bereza

View all

12 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.