GHSA-794x-2rpg-rfgr: Jj lib Jujutsu Does Not Have SHA-1 Vulnerability

MODERATE
CVSS 6.8
CWE-328
Published
Advisory Summary

GHSA-794x-2rpg-rfgr is a MODERATE (CVSS 6.8) jujutsu does not have sha-1 vulnerability (CWE-328: Use of Weak Hash) affecting Jj lib libraries in the crates.io ecosystem. The issue involves jujutsu does not have sha-1 collision detection. Remediation is available by upgrading affected packages to version 0.28.1.

GHSA-794x-2rpg-rfgr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-794x-2rpg-rfgr
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-328: Use of Weak Hash
Affected Product Jj lib
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-794x-2rpg-rfgr

To remediate this vulnerability, upgrade all affected Jj lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jj-lib fixed: 0.28.1
Upgrade jj-lib to 0.28.1
jj-cli fixed: 0.28.1
Upgrade jj-cli to 0.28.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for jj-lib

How to Check if You Are Affected

To determine whether your application is affected by GHSA-794x-2rpg-rfgr, inspect your project dependencies for Jj lib:

inspect dependencies for jj-lib

Analyze the terminal output to locate any version of Jj lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.28.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-328: Use of Weak Hash, where the product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack). In Jj lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Jujutsu 0.28.0 and earlier rely on versions of gitoxide that use SHA-1 hash implementations without any collision detection, leaving them vulnerable to hash collision attacks. ### Details This is a result of the underlying [CVE-2025-31130 / GHSA-2frx-2596-x5r6](https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6) vulnerability in the gitoxide library Jujutsu uses to interact with Git repositories; see that advisory for technical details. This separate advisory is being issued due to the downstream impact on users of Jujutsu. ### Impact An attacker with the ability to mount a collision attack on SHA-1 like the [SHAttered](https://shattered.io/) or [SHA-1 is a Shambles](https://sha-mbles.github.io/) attacks could create two distinct Git objects with the same hash. This is becoming increasingly affordable for well‐resourced attackers, with the Shambles researchers in 2020 estimating $45k for a chosen‐prefix collision or $11k for a classical collision, and projecting less than $10k for a chosen‐prefix collision by 2025. The result could be used to disguise malicious repository contents, or potentially exploit assumptions in Jujutsu’s logic to cause further vulnerabilities.

GHSA-794x-2rpg-rfgr Affected Jj lib Versions

2 component(s)
Fixed Versions:
0.28.1
Product / Package Ecosystem Affected Versions Fixed Version
jj-lib
crates.io
< 0.28.1
0.28.1
jj-cli
crates.io
< 0.28.1
0.28.1

References

Frequently Asked Questions

What is GHSA-794x-2rpg-rfgr?
GHSA-794x-2rpg-rfgr is a security vulnerability in Jj lib involving Jujutsu does not have SHA-1 collision detection under CWE-328: Use of Weak Hash.
Which Jj lib versions are affected?
Affected versions include releases prior to 0.28.1 across affected packages: jj-lib, jj-cli.
What version fixes GHSA-794x-2rpg-rfgr?
Upgrading to 0.28.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jj-lib affected?
Yes, jj-lib is affected in releases prior to 0.28.1. Upgrade your dependency to 0.28.1 or later.
Is jj-cli affected?
Yes, jj-cli is affected in releases prior to 0.28.1. Upgrade your dependency to 0.28.1 or later.
What is the CVSS score of GHSA-794x-2rpg-rfgr?
GHSA-794x-2rpg-rfgr has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with GHSA-794x-2rpg-rfgr?
GHSA-794x-2rpg-rfgr is classified under CWE-328: Use of Weak Hash (The product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack).).
How can I check crates.io dependencies for GHSA-794x-2rpg-rfgr?
Run the dependency tree command: 'inspect dependencies for jj-lib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-794x-2rpg-rfgr",
  "modified" : "2025-04-07T16:40:25Z",
  "published" : "2025-04-07T16:40:25Z",
  "aliases" : [ ],
  "summary" : "Jujutsu does not have SHA-1 collision detection",
  "details" : "### Summary\nJujutsu 0.28.0 and earlier rely on versions of gitoxide that use SHA-1 hash implementations without any collision detection, leaving them vulnerable to hash collision attacks.\n\n### Details\nThis is a result of the underlying [CVE-2025-31130 / GHSA-2frx-2596-x5r6](https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6) vulnerability in the gitoxide library Jujutsu uses to interact with Git repositories; see that advisory for technical details. This separate advisory is being issued due to the downstream impact on users of Jujutsu.\n\n### Impact\nAn attacker with the ability to mount a collision attack on SHA-1 like the [SHAttered](https://shattered.io/) or [SHA-1 is a Shambles](https://sha-mbles.github.io/) attacks could create two distinct Git objects with the same hash. This is becoming increasingly affordable for well‐resourced attackers, with the Shambles researchers in 2020 estimating $45k for a chosen‐prefix collision or $11k for a classical collision, and projecting less than $10k for a chosen‐prefix collision by 2025. The result could be used to disguise malicious repository contents, or potentially exploit assumptions in Jujutsu’s logic to cause further vulnerabilities.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "jj-lib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.28.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "jj-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.28.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jj-vcs/jj/security/advisories/GHSA-794x-2rpg-rfgr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jj-vcs/jj/commit/350da7d013773377aec0d3a4bf4374d3c941460e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jj-vcs/jj"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-328" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-07T16:40:25Z",
    "nvd_published_at" : null
  }
}