You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser URL match: subdomain confusion
File: src/browser/BrowserService.cpp ~line 1550
siteHost.endsWith(entryHost) is not anchored on a label boundary.
"notbad.example.com" matches an entry saved for "bad.example.com" (both pass the eTLD+1 check, then endsWith returns true). Entry gets offered for the wrong site. Confirm dialog still gates first use, but the manager has already told the user "this matches".
Fix: require exact match or "." + entryHost suffix.
Passkey clientDataJSON injection
File: src/browser/PasskeyUtils.cpp buildClientDataJson, ~line 356
origin is interpolated raw into a hand-rolled JSON. Validation only checks the host extracted via QUrl, not the original string. Origins like https://example.com#",\"injected\":\"yes pass validation and inject extra JSON keys into the signed clientDataJSON. Not exploitable today (browser sets origin from window.location.origin) but defense-in-depth.
Fix: JSON-escape origin and challenge before interpolation.
KeeShare docs claim signature verification that doesn't happen
Files: src/keeshare/ShareImport.cpp ~line 54, docs/topics/KeeShare.adoc
Import skips the signature file. Per PR KeeShare: Remove checking signed container and QuaZip #7223 verification was intentionally removed but the docs still say signers are verified. Anyone with write access to the share path who knows the share password can substitute the database.
Fix: docs.
SymmetricCipher::defaultIvSize disagrees with ivSize
File: src/crypto/SymmetricCipher.cpp ~line 222
defaultIvSize(GCM)=16 but ivSize(GCM)=12; same for ChaCha20/Salsa20 (12 vs 8). Polkit and Windows Hello use defaultIvSize and end up with 16-byte GCM nonces. Botan accepts it; not exploitable. Stale "AES-256-CBC" comment in WindowsHello.cpp:126 above GCM code.
Fix: make defaultIvSize call ivSize; fix comment.
BrowserHost local socket has no message framing
File: src/browser/BrowserHost.cpp readProxyMessage, ~line 70
readyRead may deliver partial JSON or two coalesced messages. fromJson returns null, message dropped silently, browser extension hangs.
Fix: per-socket buffer, parse one document at a time using JSON parser as the framing oracle.
KDBX4 outer header field length is unbounded
File: src/format/Kdbx4Reader.cpp readHeaderField, ~line 167
fieldLen is quint32, passed straight to device.read(fieldLen). Verified that QFile::read in Qt5 allocates the requested size regardless of file length. Outer header is parsed BEFORE any HMAC check or password prompt. A 49-byte malicious .kdbx with fieldLen=0xFFFFFFFE causes ~4 GiB allocation when the user opens the file. KDBX3 not affected (uses quint16).
Fix: cap fieldLen to ~1 MiB. Same cap on inner header and on HmacBlockStream/HashedBlockStream block sizes.
TempFile save mode places encrypted DB in /tmp and deletes original first
File: src/core/Database.cpp performSave, ~line 393
QTemporaryFile() defaults to /tmp. Original is QFile::remove'd before the rename. If rename fails after delete and BackupBeforeSave is off, the user has no DB. Not the default mode (atomic is) but a real footgun for users who turned atomic off.
Fix: place tempfile in the target directory; sideline the original to .old, rename, then delete sideline.
CryptoHash::addData skips empty input
File: src/crypto/CryptoHash.cpp ~line 65
Early-returns if data is empty. Botan handles zero-length update fine. No current caller depends on this, but it's a foot-gun for any future streaming hash construction with optionally-empty chunks.
Fix: drop the early return.
Type of change
✅ Bug fix (non-breaking change that fixes an issue)
This is mostly a bugreport
Consider the patch to be a suggested solution. I am not familiar enough with the codebase of keepass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several non critical security fixes
Browser URL match: subdomain confusion
File: src/browser/BrowserService.cpp ~line 1550
siteHost.endsWith(entryHost) is not anchored on a label boundary.
"notbad.example.com" matches an entry saved for "bad.example.com" (both pass the eTLD+1 check, then endsWith returns true). Entry gets offered for the wrong site. Confirm dialog still gates first use, but the manager has already told the user "this matches".
Fix: require exact match or "." + entryHost suffix.
Passkey clientDataJSON injection
File: src/browser/PasskeyUtils.cpp buildClientDataJson, ~line 356
origin is interpolated raw into a hand-rolled JSON. Validation only checks the host extracted via QUrl, not the original string. Origins like https://example.com#",\"injected\":\"yes pass validation and inject extra JSON keys into the signed clientDataJSON. Not exploitable today (browser sets origin from window.location.origin) but defense-in-depth.
Fix: JSON-escape origin and challenge before interpolation.
KeeShare docs claim signature verification that doesn't happen
Files: src/keeshare/ShareImport.cpp ~line 54, docs/topics/KeeShare.adoc
Import skips the signature file. Per PR KeeShare: Remove checking signed container and QuaZip #7223 verification was intentionally removed but the docs still say signers are verified. Anyone with write access to the share path who knows the share password can substitute the database.
Fix: docs.
SymmetricCipher::defaultIvSize disagrees with ivSize
File: src/crypto/SymmetricCipher.cpp ~line 222
defaultIvSize(GCM)=16 but ivSize(GCM)=12; same for ChaCha20/Salsa20 (12 vs 8). Polkit and Windows Hello use defaultIvSize and end up with 16-byte GCM nonces. Botan accepts it; not exploitable. Stale "AES-256-CBC" comment in WindowsHello.cpp:126 above GCM code.
Fix: make defaultIvSize call ivSize; fix comment.
BrowserHost local socket has no message framing
File: src/browser/BrowserHost.cpp readProxyMessage, ~line 70
readyRead may deliver partial JSON or two coalesced messages. fromJson returns null, message dropped silently, browser extension hangs.
Fix: per-socket buffer, parse one document at a time using JSON parser as the framing oracle.
KDBX4 outer header field length is unbounded
File: src/format/Kdbx4Reader.cpp readHeaderField, ~line 167
fieldLen is quint32, passed straight to device.read(fieldLen). Verified that QFile::read in Qt5 allocates the requested size regardless of file length. Outer header is parsed BEFORE any HMAC check or password prompt. A 49-byte malicious .kdbx with fieldLen=0xFFFFFFFE causes ~4 GiB allocation when the user opens the file. KDBX3 not affected (uses quint16).
Fix: cap fieldLen to ~1 MiB. Same cap on inner header and on HmacBlockStream/HashedBlockStream block sizes.
TempFile save mode places encrypted DB in /tmp and deletes original first
File: src/core/Database.cpp performSave, ~line 393
QTemporaryFile() defaults to /tmp. Original is QFile::remove'd before the rename. If rename fails after delete and BackupBeforeSave is off, the user has no DB. Not the default mode (atomic is) but a real footgun for users who turned atomic off.
Fix: place tempfile in the target directory; sideline the original to .old, rename, then delete sideline.
CryptoHash::addData skips empty input
File: src/crypto/CryptoHash.cpp ~line 65
Early-returns if data is empty. Botan handles zero-length update fine. No current caller depends on this, but it's a foot-gun for any future streaming hash construction with optionally-empty chunks.
Fix: drop the early return.
Type of change
This is mostly a bugreport
Consider the patch to be a suggested solution. I am not familiar enough with the codebase of keepass