snes9x
CVE-2026-39199
LOW
Severity by source
AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
UI:R added because user must actively apply the crafted .ups file; I:L added since CWE-787 out-of-bounds write implies at least minor memory integrity impact beyond pure DoS.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
snes9x 1.63 allows an out-of-bounds write and denial of service via a crafted .ups file.
AnalysisAI
Out-of-bounds write in snes9x 1.63's UPS patch file parser allows a crafted .ups ROM patch file to trigger memory corruption and a denial-of-service crash. The flaw resides in the ReadUPSPatch loop in memmap.cpp, where the loop iterator relative was not bounded against CMemory::MAX_ROM_SIZE, permitting writes past the end of the allocated ROM buffer. Impact is limited to availability (crash) per the CVSS vector, though the underlying CWE-787 out-of-bounds write class carries broader memory-safety implications. No public exploit identified at time of analysis, and CVSS rates this Low (2.9) due to local attack vector and high complexity.
Technical ContextAI
snes9x is an open-source Super Nintendo Entertainment System emulator maintained by the snes9x team (CPE: cpe:2.3:a:snes9x_team:snes9x). The UPS patch format is used to apply binary patches to ROM files. The vulnerable code in memmap.cpp iterates over a UPS patch stream with the condition while(addr < size - 12), advancing a relative offset without checking it against CMemory::MAX_ROM_SIZE. CWE-787 (Out-of-Bounds Write) is the root cause: the missing bounds check on relative allows the write cursor to exceed the ROM buffer boundary. The fix, visible in commit 96b366100172723f6314c40e237b370f4f7b59f4, adds && relative < CMemory::MAX_ROM_SIZE as a second loop guard. This is a classic unbounded loop write pattern where one dimension of the input (file size) is checked but a derived internal offset is not independently validated.
RemediationAI
An upstream fix is available via commit 96b366100172723f6314c40e237b370f4f7b59f4 on the snes9x GitHub repository (https://github.com/snes9xgit/snes9x/commit/96b366100172723f6314c40e237b370f4f7b59f4); however, a formally released patched version is not independently confirmed from the available data - users should check https://github.com/snes9xgit/snes9x/releases for a tagged release incorporating this commit. As a compensating control, users should avoid applying UPS patch files obtained from untrusted or unverified sources, which eliminates the attack surface without requiring an update. Distribution package maintainers (Debian, Arch, Homebrew, etc.) should cherry-pick the fix commit into their packaged versions. There are no configuration settings within snes9x to disable UPS patch support, so source-level patching or abstaining from untrusted .ups files are the only mitigations available.
Same weakness CWE-787 – Out-of-bounds Write
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today