Skip to content

KeePassDX Unlock Failure. #436

Open
Open

Description

@NotMindGame

I wrote a Python tool that uses your pykeepass library. I used it to write some filenames into a KDBX file generated by KeePassDX, and it worked—or so I thought. Later I found out that KeePassDX could no longer open that database file. I don't remember whether it was V2 or V3 back then (this was before the V4 release), but at the time KeePassDX opened it just fine. My mistake: I didn't keep a backup.

After hours of troubleshooting, I first noticed that pykeepass could still open the file, so I wrote a small script to dump it to XML—and the contents came out perfectly intact. Then I dove into the source code of KeePassXC, KeePassDX, and pykeepass, trying to pinpoint the issue. I tweaked Argon2's memory parameter, messed with the AWS UUID, played around with padding, and read through multiple KeePass codebases to understand the KDBX structure, the recognition logic, encryption, decryption, the overall flow, and the standard spec.

Within the first two or three hours, I already had a self-ported KeePassXC-CLI, the web tool app.keeweb.info, your pykeepass, and my own little KDBX utility all able to open the file—but KeePassDX still wouldn't. I've been using a key file with no password from the start. At first I thought the --no-password flag might be the culprit, but that turned out to be a dead end. Eventually I hacked together a KeePassDX-like command-line tool based on its own source code, and that actually worked. I thought I was finally done—until I tried opening the file on my phone with the actual KeePassDX app. Still no luck.

I've tried nine different fixes in total, and every single one of them failed. Every attempt just gave me the same error: "Failed to load database."

To be honest, my technical skills just aren't cutting it here. So I'm out of ideas. Figured I'd reach out to the original author of pykeepass and see if you have any insight.

I will upload my tool to my Github repository.You can check it.

Activity

  1. Evidlo commented on Aug 16, 2026

    @Evidlo
    Member
  2. NotMindGame commented on Aug 18, 2026

    @NotMindGame
    Author

    changing

    I think the problem caused by pykeepass.The only good thing is that we can go to the web app.keeweb.info to convert the corrupted KDBX file back to a normal KDBX file.You are the creators of the pykeepass.You are familiar with the pykeepass.But I am not familiar with it.

  3. NotMindGame commented on Aug 18, 2026

    @NotMindGame
    Author

    changing

    I think the problem caused by pykeepass.The only good thing is that we can go to the web app.keeweb.info to convert the corrupted KDBX file back to a normal KDBX file.You are the creators of the pykeepass.You are familiar with the pykeepass.But I am not familiar with it.

    I extremely think the bug caused by version updating.But I don't know which updating is the cause.

  4. Evidlo commented on Aug 19, 2026

    @Evidlo
    Member

    If you can provide an example kdbx+password that reproduces the issue, I can take a look. I dont have enough information right now to attempt fixing this.

  5. mvnetbiz commented on Oct 12, 2026

    @mvnetbiz

    I just encountered the same issue. I'm guessing it happened after editing a version 3 kdbx with gnome-secrets (and therefore pykeepass), but I didn't have file versioning enabled so I can't trace back. I was unable to open with KeePassDX. I tried using KeePassXC on desktop which gave a more specific error that the hash in the header mismatched. Since I suspected that nothing else was actually corrupted I commented out the line of code that errors out and it opens successfully. I changed the format in KeePassXC to version 4 and saved. Hopefully it's fine from now on but I kept a backup of the last version in case something goes wrong or I can use it to debug the root cause.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions