Skip to content
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

High attention point related to "Padding Oracle", reported by MobSF, when using encryption mode, "AES/CBC/PKCS7Padding", in class "StorageCipher18Implementation.java". #562

Closed
kaganzdmr58 opened this issue May 2, 2023 · 5 comments

Comments

@kaganzdmr58
Copy link

When I analyzed the project with mobsf, it said that it found a high priority error. When I followed the error, I discovered that an old method was used in the library, can you help me to fix the error?

const AndroidOptions(
encryptedSharedPreferences: true,
storageCipherAlgorithm: StorageCipherAlgorithm.AES_GCM_NoPadding
);

I tried this but my problem still persists, i get this error from MobSf "The App uses the encryption mode CBC with PKCS5/PKCS7 padding. This configuration is vulnerable to padding oracle attacks."

@kaganzdmr58
Copy link
Author

Error page

com/it_nomads/fluttersecurestorage/ciphers/StorageCipher18Implementation.java

StorageCipher18Implementation.java
protected Cipher getCipher() throws Exception {
return Cipher.getInstance("AES/CBC/PKCS7Padding");
}

STANDARTS
CWE: CWE-649: Reliance on Obfuscation or Encryption of Security-Relevant Inputs without Integrity Checking
OWASP Top 10: M5: Insufficient Cryptography
OWASP MASVS: MSTG-CRYPTO-3

@nhan7777
Copy link

I have the same issue when scan app via Qualys

@abirajabi
Copy link

I'm also having this issue. Is there any workaround for this problem?

@ernestomar
Copy link

Possible duplicate of #526?

@juliansteenbakker
Copy link
Owner

The fix of this issue will be discussed in #769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants