@simonsmith/cypress-image-snapshothas fix for insecure snapshot file names
Moderate severity
GitHub Reviewed
Published
Jul 31, 2023
in
simonsmith/cypress-image-snapshot
•
Updated Nov 6, 2023
Description
Published to the GitHub Advisory Database
Aug 1, 2023
Reviewed
Aug 1, 2023
Published by the National Vulnerability Database
Aug 4, 2023
Last updated
Nov 6, 2023
Impact
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. Example:
The above will create an
ignore-relative-dirs.png
three levels upPatches
Fixed in
8.0.2
Workarounds
Validate all the existing uses of
matchImageSnapshot
to ensure correct use of the filename argument. Example:References
simonsmith/cypress-image-snapshot#15
References