-
CVSS Score
-The vulnerability stemmed from how snapshot filenames were generated in src/plugin.ts. Before the patch (<=8.0.1), the code used screenshotConfig.name.replace() to clean test failure suffixes but didn't sanitize directory traversal characters. The commit ef49519 fixed this by using path.basename(screenshotConfig.path) instead, which leverages Cypress' pre-sanitized paths. The vulnerable function runImageDiffAfterScreenshot handled user-provided filenames directly, making it the root cause of the path traversal issue.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @simonsmith/cypress-image-snapshot | npm | <= 8.0.1 | 8.0.2 |