JAL 2026.11.3 backup restore: symlink handling before file extraction
JAL 2026.11.3 backup restore: symlink handling before file extraction JAL, or Just Another Ledger, through version 2026.11.3 contains an arbitrary file overwrite vulnerability in its backup restore feature. CVE-2026-13
JAL 2026.11.3 backup restore: symlink handling before file extraction
JAL, or Just Another Ledger, through version 2026.11.3 contains an arbitrary file overwrite vulnerability in its backup restore feature. CVE-2026-137529 describes a crafted .tgz backup that includes a jal.sqlite symbolic link followed by a regular jal.sqlite member. Restoring the archive can write outside the intended directory and overwrite files such as shell startup scripts.
Archive extraction is a classic path and link problem. An archive can contain ordinary files, directories, absolute paths, traversal sequences, hard links and symbolic links. A safe extractor must decide the type of each member before writing. The destination should be created inside a temporary root, and the resolved path should remain inside that root after link resolution.
The order of members matters. A link can point to a path that is outside the extraction directory, then a later file member can be written through the link. Rejecting ../ in the member name does not catch this case. The extractor should reject symbolic links by default, or validate the link target and prohibit writes through it. It should also reject absolute names, device nodes and unsupported compression metadata.
Backups often carry high trust because users think of them as recovery data. A shared ledger backup may arrive through email, chat or a support ticket. The restore action should show the archive source, hash and metadata before extraction. It should run under a dedicated account with no write access to the user's home, shell profiles or application installation directory.
The application's database path needs special care. If the restore code assumes that jal.sqlite is a normal file, an attacker can make the name refer to another location. The database path should be generated by the application in a fresh directory. Existing files should be replaced only after the archive has been fully inspected and written to a staging area.
Python 3.14 changed some extraction defaults, and the advisory's referenced conditions depend on the runtime and code path. That makes runtime version alone a poor mitigation. The application must enforce its own policy even when the standard library adds safer defaults.
Version 2026.11.3 is the last affected release named by the advisory, and the referenced patch commit is the implementation to review. Users should update, preserve suspicious archives and check shell startup files, authorized keys and recent login records if a malicious backup was restored. The restore process should be repeated in a clean directory to confirm the fix.
The larger lesson applies to every import feature. A compressed file is an input language with paths, links and ordering. Parse it as hostile data, extract into a contained staging area and only then promote the expected database file into service.
References
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes â full credit and traffic to the original publisher.