VYPR
Unrated severityNVD Advisory· Published Nov 17, 2003· Updated Jun 16, 2026

CVE-2003-0865

CVE-2003-0865

Description

Heap-based buffer overflow in readstring of httpget.c for mpg123 0.59r and 0.59s allows remote attackers to execute arbitrary code via a long request.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Patches

Vulnerability mechanics

Root cause

"The readstring function in httpget.c does not properly limit the amount of data written to a buffer."

Attack vector

A remote attacker can send a long request to the mpg123 client when it attempts to read from a remote host, such as an HTTP audio streaming service. The `readstring` function, used in this context, does not utilize its `maxlen` argument, allowing it to write beyond the allocated buffer. This can lead to heap corruption and arbitrary code execution [ref_id=1].

Affected code

The vulnerability exists in the `readstring` function, located in `httpget.c`. This function is responsible for reading strings from remote hosts and is used in conjunction with the `*request` buffer, which is allocated to 1024 bytes [ref_id=1].

What the fix does

The advisory indicates that the `readstring` function in `httpget.c` does not properly limit the amount of data written to a buffer. A quick fix suggested involves modifying the `while(1)` loop to `while(maxlen>pos)`, ensuring that the `maxlen` argument is respected and preventing buffer overflows [ref_id=1].

Preconditions

  • inputThe attacker must be able to send a crafted, long request to the mpg123 client.
  • networkThe mpg123 client must be configured to connect to a remote resource, such as an HTTP audio stream.

Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.