Miggo Logo

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

EPSS Score
0.62106%
Published
3/27/2023
Updated
3/27/2023
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
Snappiernuget= 1.1.01.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from improper handling of buffer end references. The commit diff shows critical changes in how buffer limits are defined:

  1. 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.
  2. 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t T*is is * *u***r ov*rrun vuln*r**ility t**t **n *****t *ny us*r o* Sn*ppi*r *.*.*. In t*is r*l**s*, mu** o* t** *o** w*s r*writt*n to us* *yt* r***r*n**s r*t**r t**n point*rs to pinn** *u***rs. T*is ***n** **n*r*lly improv*s p*r*orm*n** *n

Reasoning

T** vuln*r**ility st*mm** *rom improp*r **n*lin* o* *u***r *n* r***r*n**s. T** *ommit *i** s*ows *riti**l ***n**s in *ow *u***r limits *r* ***in**: *. In Sn*ppy*ompr*ssor.*s, *in*M*t**L*n*t* ori*in*lly us** s*Limit pointin* to t** l*st v*li* *yt* (in