Vulnerabilities in pkg:maven/com.gitblit/gitblit

PACKAGE
Advisory Identifier: GHSA-fh55-vwjc-69c7
Advisory Summary

CVE-2022-31267 is a CRITICAL (CVSS 9.8) unescaped control characters vulnerability (CWE-269: Improper Privilege Management) affecting Gitblit libraries in the Maven ecosystem. The issue involves unescaped control characters in gitblit. Remediation is available by upgrading affected packages to version 1.9.3.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.gitblit/gitblit

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.gitblit/gitblit. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-fh55-vwjc-69c7 CVE-2022-31267 CRITICAL Unescaped control characters in Gitblit
GHSA-2c65-rq62-fqhq CVE-2022-31268 HIGH Path traversal in Gitblit

CVE-2022-31267 at a Glance

CVE Identifier CVE-2022-31267
GHSA Identifier GHSA-fh55-vwjc-69c7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Gitblit
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2022-31267

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

com.gitblit:gitblit fixed: 1.9.3
<dependency>
    <groupId>com.gitblit</groupId>
    <artifactId>gitblit</artifactId>
    <version>1.9.3</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=com.gitblit

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-31267, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.gitblit

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

Note: The mvn dependency:tree -Dincludes=com.gitblit command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Gitblit, 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

Gitblit 1.9.2 allows privilege escalation via the Config User Service: a control character can be placed in a profile data field, such as an emailAddress%3Atext 'attacker@example.com\n\trole = "#admin"' value.

CVE-2022-31267 Affected Gitblit Versions

1 component(s)
Fixed Versions:
1.9.3
Product / Package Ecosystem Affected Versions Fixed Version
com.gitblit:gitblit
Maven
< 1.9.3
1.9.3

References

Frequently Asked Questions

What is CVE-2022-31267?
CVE-2022-31267 is a security vulnerability in Gitblit involving Unescaped control characters in Gitblit under CWE-269: Improper Privilege Management.
Which Gitblit versions are affected?
Affected versions include releases prior to 1.9.3 across affected packages: com.gitblit:gitblit.
What version fixes CVE-2022-31267?
Upgrading to 1.9.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gitblit affected?
Yes, com.gitblit:gitblit is affected in releases prior to 1.9.3. Upgrade your dependency to 1.9.3 or later.
What is the CVSS score of CVE-2022-31267?
CVE-2022-31267 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-31267?
CVE-2022-31267 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Maven dependencies for CVE-2022-31267?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.gitblit'. 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-fh55-vwjc-69c7",
  "modified" : "2022-06-08T18:09:39Z",
  "published" : "2022-05-22T00:00:32Z",
  "aliases" : [ "CVE-2022-31267" ],
  "summary" : "Unescaped control characters in Gitblit",
  "details" : "Gitblit 1.9.2 allows privilege escalation via the Config User Service: a control character can be placed in a profile data field, such as an emailAddress%3Atext 'attacker@example.com\\n\\trole = \"#admin\"' value.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.gitblit:gitblit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31267"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gitblit/gitblit/issues/1410"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gitblit/gitblit/commit/9b4afad6f4be212474809533ec2c280cce86501a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gitblit/gitblit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gitblit/gitblit/releases/tag/v1.9.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-25T22:29:37Z",
    "nvd_published_at" : "2022-05-21T21:15:00Z"
  }
}