Skip to content
Memory corruption Advisory Advanced CVE-2025-66047CVE-2025-66045CVE-2025-66044CVE-2025-66048CVE-2025-66043CVE-2025-66046

The Biosig Project libbiosig MFER parsing multiple stack-based buffer overflow vulnerabilities

Several stack-based buffer overflows exist in libbiosig's MFER file parsing because length fields from the file are used to read data into fixed-size stack buffers without bounds checks. An attacker could supply a malicious MFER file to cause a crash or potentially execute arbitrary code.

Mark Bereza Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

Several stack-based buffer overflow vulnerabilities exists in the MFER parsing functionality of The Biosig Project libbiosig 3.9.1. 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 MFER parser reads a length from the file and passes it to ifread without checking that the destination stack buffer is large enough.

Impact

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

What the attacker needed

Victim opens a malicious MFER file

The fix

The vendor released a patch on 2025-12-10, though the text does not describe the fix details.

How it was found

  1. Craft an MFER file with a tag value of 3 and a length field greater than 16.
  2. Open the file with libbiosig, which calls sopen_extended and identifies it as MFER.
  3. The parser reads the length and calls ifread to copy that many bytes into the 17-byte stack buffer v.
  4. The overflow occurs, as shown by AddressSanitizer reporting a stack-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.

A buffer overflow happens when a program writes more data into a fixed-size memory area than it can hold, spilling into nearby memory. Here, the program trusts a length value from the file and copies that many bytes into a small stack buffer, so a crafted file can overwrite other data on the stack. This can crash the program or, in some cases, 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.

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.