Skip to content

fix(security): 2 improvements across 2 files#854

Open
tomaioo wants to merge 2 commits into
nextcloud:masterfrom
tomaioo:fix/security/weak-cryptographic-parameters-for-vault-
Open

fix(security): 2 improvements across 2 files#854
tomaioo wants to merge 2 commits into
nextcloud:masterfrom
tomaioo:fix/security/weak-cryptographic-parameters-for-vault-

Conversation

@tomaioo

@tomaioo tomaioo commented Apr 25, 2026

Copy link
Copy Markdown

Summary

fix(security): 2 improvements across 2 files

Problem

Severity: High | File: js/app/services/encryptservice.js:L31

The encryption configuration uses PBKDF iterations set to 1000 and an authentication tag size (ts) of 64 bits for SJCL CCM mode. For a password manager context, these settings are weak by modern standards and reduce resistance against brute-force and forgery attempts.

Solution

Increase KDF work factor substantially (e.g., PBKDF2 >= 100k+ iterations or migrate to Argon2/scrypt if possible), and use a 128-bit authentication tag. Re-evaluate all crypto defaults against current best practices and threat model.

Changes

  • js/app/services/encryptservice.js (modified)
  • js/app/services/settingsservice.js (modified)

tomaioo added 2 commits April 24, 2026 23:14
- Security: Weak cryptographic parameters for vault/client-side encryption
- Security: Potential storage of vault password in browser localStorage

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Weak cryptographic parameters for vault/client-side encryption
- Security: Potential storage of vault password in browser localStorage

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>

@binsky08 binsky08 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't merge this at all. The first (encryption related) issue is real but needs further investigation. The second addressed issue is not an issue in my eyes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint.
I'll keep an eye on this. Just changing the numbers here would most likely break the app right now. Not the encryption itself, but the app logic. I'll figure out how the other project depending apps and libs are handling this right now before touching anything here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, setting a default vault with optional auto login is a "feature" and requires the vault password to be stored in defaultVaultPass. Not sure who would use that, but it's basically intended behaviour.
I am sure your changes here would break that.

Image

So please explain the reason for the changes here, or remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants