CVE-2022-29171
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedSourcegraph is a fast and featureful code search and navigation engine. Versions before 3.38.0 are vulnerable to Remote Code Execution in the gitserver service. The Gitolite code host integration with Phabricator allows Sourcegraph site admins to specify a `callsignCommand`, which is used to obtain the Phabricator metadata for a Gitolite repository. An administrator who is able to edit or add a Gitolite code host and has administrative access to Sourcegraph’s bundled Grafana instance can change this command arbitrarily and run it remotely. This grants direct access to the infrastructure underlying the Sourcegraph installation. The attack requires: site-admin privileges on the instance of Sourcegraph, Administrative privileges on the bundled Grafana monitoring instance, Knowledge of the gitserver IP address or DNS name (if running in Kubernetes). This can be found through Grafana. The issue is patched in version 3.38.0. You may disable Gitolite code hosts. We still highly encourage upgrading regardless of workarounds.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceSourcegraph versions before 3.38.0 contain an RCE vulnerability in the gitserver service via the Gitolite-Phabricator integration. Attackers with both site-admin privileges and Grafana administrative access can modify the callsignCommand configuration to execute arbitrary commands on the underlying gitserver infrastructure.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 3.38.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- High
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Sourcegraph versionAccess the Sourcegraph site administration panel or check the version via the site-config API endpoint /site-config. Alternatively, check the Docker container or deployment manifest for the version tag.Affected if The installed version is any version before 3.38.0 (e.g., 3.37.x, 3.36.x, etc.)
-
Verify if Gitolite code host integration is enabledIn Sourcegraph site administration, navigate to the code hosts or gitserver settings. Look for any configured Gitolite or Phabricator integrations.Affected if Gitolite code host integration is actively configured or connected in the Sourcegraph instance
-
Confirm Grafana administrative access existsCheck if Grafana is exposed and accessible. Verify whether site-admin users also have Grafana admin privileges, or check if separate Grafana admin credentials exist.Affected if A user possesses both Sourcegraph site-admin rights and Grafana administrative access
-
Inspect callsignCommand configurationIn the Sourcegraph site configuration or gitserver settings, locate the callsignCommand parameter. This is typically found under gitserver configuration or code host settings.Affected if The callsignCommand field is present and contains a non-empty value, or can be modified by administrative users
The environment is affected if Sourcegraph version is below 3.38.0 AND the Gitolite integration is enabled AND an attacker could obtain both site-admin and Grafana admin access to modify callsignCommand.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.38.0
Upgrade to Sourcegraph 3.38.0 or later, or disable Gitolite code host integrations entirely to eliminate the attack surface.
3.38.0
- 1. Review the current Sourcegraph version by navigating to the site admin dashboard or checking the deployment configuration
- 2. Plan for downtime during the upgrade process - schedule a maintenance window
- 3. Back up the Sourcegraph database and configuration files before proceeding
- 4. For Kubernetes deployments: update the Sourcegraph deployment using your Helm chart or kubectl with the new version (e.g., kubectl set image deployment/sourcegraph sourcegraph=sourcegraph/server:3.38.0)
- 5. For Docker Compose deployments: update the docker-compose.yml file to use version 3.38.0 images and run docker-compose up -d
- 6. For single-container deployments: stop the current container and start a new one with the 3.38.0 image tag
- 7. Verify the upgrade was successful by checking the Sourcegraph version in the admin dashboard
- 8. Confirm the Gitolite code host integration is functioning correctly with the new version
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation3.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,120.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-29171 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-29171 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data