Intel

AIKIDO-2026-10371

@sentry/sveltekit is vulnerable to Race Condition (TOCTOU)

Race Condition (TOCTOU) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.

50

Medium Risk

This Affects:

JS@sentry/sveltekit
7.51.0 - 10.42.0
Fixed in 10.43.0

TL;DR

Affected versions of @sentry/sveltekit use an existsSync(mapFile) check before reading and writing source map files during the SvelteKit build (in closeBundle). Between the time-of-check and time-of-use, the file system can change (e.g. file removed or replaced), causing a time-of-check-time-of-use (TOCTOU) race. A local attacker with control over the build environment could exploit this to influence which file is read or written, potentially leaking build artifacts or corrupting outputs. The patch removes the existsSync guard and wraps the read and write in a try/catch so that missing or changed files are handled without relying on a prior check.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@sentry/sveltekit is vulnerable to Race Condition (TOCTOU) in versions 7.51.0 - 10.42.0.

How to fix this

Upgrade the @sentry/sveltekit library to the patch version.