CVE-2023-28638: Snappier vulnerable to buffer overrun due to improper restriction of operations within the bounds of a memory buffer
7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.62106%
CWE
Published
3/27/2023
Updated
3/27/2023
KEV Status
No
Technology
C#
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| Snappier | nuget | = 1.1.0 | 1.1.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper handling of buffer end references. The commit diff shows critical changes in how buffer limits are defined:
- In SnappyCompressor.cs, FindMatchLength originally used s2Limit pointing to the last valid byte (input.Length - 1). During range checks, this could temporarily create references outside the buffer when comparing against s2Limit.
- In SnappyDecompressor.cs, DecompressAllTags similarly used inputEnd = input.Length - 1, creating the same risk during decompression buffer checks. The patches changed these to use input.Length (one past the end), which is GC-safe. These functions directly handled buffer range validation and were modified to address the core issue described in the advisory.