CVE-2026-59144: CWE-121 Stack-based Buffer Overflow in EGOR Data::RingBuffer::Shared
Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq. The attach-time validator ring_validate_header checks the capacity-overflow and total_size consistency of the header but never caps elem_size against the destination size. ring_read_seq does memcpy(out, ring_slot(h, seq), elem_size) with elem_size read raw from the mmap'd segment, copying into a fixed 8-byte destination scalar. An elem_size larger than 8 bytes writes past the destination. A local peer that can write the backing file can leave the header valid while setting a large elem_size, so the next read copies a file-controlled length into the fixed 8-byte stack buffer, corrupting adjacent stack frames.
AI Analysis
Technical Summary
The vulnerability in Data::RingBuffer::Shared (<0.04) arises from improper validation of the elem_size parameter in the ring_read_seq function. Although the ring_validate_header function checks capacity-overflow and total_size consistency, it does not limit elem_size relative to the fixed 8-byte destination buffer. Consequently, memcpy copies elem_size bytes from a memory-mapped segment into an 8-byte stack buffer, leading to a stack-based buffer overflow. A local attacker who can write to the backing file can craft a valid header with an oversized elem_size, triggering the overflow on the next read.
Potential Impact
Exploitation of this vulnerability allows a local attacker with write access to the backing file to cause a stack buffer overflow, potentially leading to memory corruption. This could result in application crashes or arbitrary code execution depending on the context and further exploitation. No remote exploitation or known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict local write access to the backing file used by Data::RingBuffer::Shared to trusted users only to prevent manipulation of elem_size. Monitor for vendor updates addressing this vulnerability.
CVE-2026-59144: CWE-121 Stack-based Buffer Overflow in EGOR Data::RingBuffer::Shared
Description
Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq. The attach-time validator ring_validate_header checks the capacity-overflow and total_size consistency of the header but never caps elem_size against the destination size. ring_read_seq does memcpy(out, ring_slot(h, seq), elem_size) with elem_size read raw from the mmap'd segment, copying into a fixed 8-byte destination scalar. An elem_size larger than 8 bytes writes past the destination. A local peer that can write the backing file can leave the header valid while setting a large elem_size, so the next read copies a file-controlled length into the fixed 8-byte stack buffer, corrupting adjacent stack frames.
Affected software
pkg:github/Data-RingBuffer-SharedRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Data::RingBuffer::Shared (<0.04) arises from improper validation of the elem_size parameter in the ring_read_seq function. Although the ring_validate_header function checks capacity-overflow and total_size consistency, it does not limit elem_size relative to the fixed 8-byte destination buffer. Consequently, memcpy copies elem_size bytes from a memory-mapped segment into an 8-byte stack buffer, leading to a stack-based buffer overflow. A local attacker who can write to the backing file can craft a valid header with an oversized elem_size, triggering the overflow on the next read.
Potential Impact
Exploitation of this vulnerability allows a local attacker with write access to the backing file to cause a stack buffer overflow, potentially leading to memory corruption. This could result in application crashes or arbitrary code execution depending on the context and further exploitation. No remote exploitation or known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict local write access to the backing file used by Data::RingBuffer::Shared to trusted users only to prevent manipulation of elem_size. Monitor for vendor updates addressing this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-07-02T16:24:17.913Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a5fcbb52a4a8d5989ac6ccc
Added to database: 07/21/2026, 19:42:45 UTC
Last enriched: 07/21/2026, 19:53:41 UTC
Last updated: 07/21/2026, 21:09:17 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.