@sentry/sveltekit is vulnerable to Race Condition (TOCTOU)
50
Medium Risk
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.
You are affected if you are using a version that falls within the vulnerable range.
@sentry/sveltekit is vulnerable to Race Condition (TOCTOU) in versions 7.51.0 - 10.42.0.
Upgrade the @sentry/sveltekit library to the patch version.
Secure your code, cloud, and runtime environments in one central system. Find and fix vulnerabilities automatically.
No credit card required | Scan results in 32secs.
SOC 2Compliant
ISO 27001Compliant