-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift: Trivial changes to swift/unsafe-unpacking #15607
Conversation
QHelp previews: swift/ql/src/experimental/Security/CWE-022/UnsafeUnpack.qhelpArbitrary file write during a zip extraction from a user controlled sourceUnpacking files from a malicious zip without properly validating that the destination file path is within the destination directory, or allowing symlinks to point to files outside the extraction directory, allows an attacker to extract files to arbitrary locations outside the extraction directory. This helps overwrite sensitive user data and, in some cases, can lead to code execution if an attacker overwrites an application's shared object file. RecommendationConsider using a safer module, such as: ExampleThe following examples unpacks a remote zip using `Zip.unzipFile()` which is vulnerable to path traversal.
The following examples unpacks a remote zip using `fileManager.unzipItem()` which is vulnerable to symlink path traversal.
Consider using a safer module, such as:
References
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Trivial changes to the new
swift/unsafe-unpacking
query: