-
Notifications
You must be signed in to change notification settings - Fork 986
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
Hash Generated Using Broken Cryptography API (SHA1) #1238
Comments
Can someone please help on this.!!? |
@JayP2405 well, my up-to-date fork of the library has its own repo — https://github.com/birdofpreyru/react-native-fs I am also not sure if this is really an issue. I know, SHA1 is not crypto-secure; but as far as a file-system library is concerned — if for whatever reason the library consumer needs to calculate a SHA1 hash of a file, the library provides him a function to get it. I believe, it does not use it for anything else. |
@birdofpreyru I checked the up-to-date fork of the library & it also contains the same piece of code. But can there be a way to just remove these vulnerable hashing algorithms.?? I am new to understand these concepts, but my project security team is asking to remove these codes, as it can be a store release blocker anytime soon. |
I don't know — I last released an update of my iOS app, relying on this lib, yesterday... and had no problems with it passing Apple review process. I doubt Apple will ban MD5 / SHA1 hash functions, as they routinely used as checksums, that do not have to be crypto-secure. Your project's security team just does not understand security and blindly follows whatever a security scanner tells them — exactly the sort of people who create bizarre security holes :D In the end of day, you may use patch-package to patch the library in-place, removing code pieces that trigger security scanner; as I said, I don't see a reason to remove them from the library for everybody. |
Hash Generated Using Broken Cryptography API (SHA1)
Severity: Medium
Exploitability: Difficult
CVSS: 4.0
The following code locations within the App use 'CC_SHA1' or 'CryptoKit.Insecure.SHA1' functions to generate a message digest:
-[RNFSManager hash:algorithm:resolver:rejecter:] calls _CC_SHA1()
The vulnerable code locations use the 'CC_SHA1' or 'CryptoKit.Insecure.SHA1' hashing functions, which leverage hashing algorithms that are proven to be vulnerable to collision attacks, and are unsuitable for modern use.
Apple officially considers this algorithm insecure. They state in iOS 13 CryptoKit documentation:
Recommendation:
Switch each usage of these outdated hashing functions to use a stronger algorithm with better collision resistance properties, such as SHA-256 or SHA-512.
Stack Trace:
The following related source code symbols were identified:
Analysis:
On tracking, found the vulnerable codes inside RNFSManager.m file.
The text was updated successfully, but these errors were encountered: