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

[Feature]: Allow encrypting cookies before storing them #7421

Open
1 of 3 tasks
flgubler-ergon opened this issue Apr 22, 2024 · 0 comments
Open
1 of 3 tasks

[Feature]: Allow encrypting cookies before storing them #7421

flgubler-ergon opened this issue Apr 22, 2024 · 0 comments
Labels

Comments

@flgubler-ergon
Copy link

flgubler-ergon commented Apr 22, 2024

Description

Storing cookies in encrypted format

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

The CapacitorCookies plugin (CapacitorCookieManager) on Android stores the cookies in an sqlite database in the app's data folder: /data/data/[bundle-identifier]/app_webview/Default/Cookies.

While this approach protects the cookies against most apps, it is vulnerable in the context of a rooted device. With root present, a malicious app could easily read these cookies which may e.g. contain the session-cookie. Thereby an authenticated session could be stolen.

It would therefore be great to have the option to configure the plugin to encrypt the cookies before storing them in this sqlite database. The symmetric-key used for encryption and decryption could itself be stored in the Android Keystore.

Alternatives

If it were possible to specifically override the default-implementation of the CapacitorCookieManager (without forking the project), this would give developers the flexibility required to implement such encryption logic themselves.

Additional Information

This feature request is based on a penetration-testing report which only indicated the vulnerability for Android. I am not familiar with the iOS implementation.

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

No branches or pull requests

1 participant