TeamcityApplication · Jetbrains

CVE-2022-40979

MEDIUM · 5.3 CVSS v3.1 Published 2022-09-23
Fix available
A fix is available. Upgrade to 2022.04.4 or later.
See remediation →
62/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

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 · unedited
In JetBrains TeamCity before 2022.04.4 environmental variables of "password" type could be logged when using custom Perforce executable

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 confidence

In JetBrains TeamCity versions prior to 2022.04.4, environment variables marked as 'password' type were being written to logs when the system utilized a custom Perforce executable, leading to potential credential exposure.

MitigationUpgrade TeamCity to version 2022.04.4 or later, which addresses the improper logging of password-type environment variables. Alternatively, audit existing logs for exposed credentials and rotate any compromised passwords.

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
TeamcityApplication
Affected:< 2022.04.4

CVSS 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
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

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 checks

Work through these to decide whether this CVE applies to you.

  1. Check TeamCity version
    Access the TeamCity web UI and navigate to 'Administration > Server Configuration > About' to view the server version, or check the version.xml file in the TeamCity data directory
    Affected if The installed version is prior to 2022.04.4
  2. Identify Perforce VCS roots
    Navigate to 'Administration > VCS Roots' in the TeamCity web UI and review all VCS root configurations to identify any using the Perforce VCS type
    Affected if A Perforce VCS root is configured and in use
  3. Verify custom Perforce executable path
    For each Perforce VCS root identified, edit the configuration and check if a custom Perforce executable path is specified in the VCS settings (commonly in 'Path to P4' or 'Perforce executable' field)
    Affected if A custom Perforce executable path is configured rather than using the default system Perforce
  4. Check for password-type parameters
    Navigate to 'Administration > Properties' and review all registered parameters, or inspect build configurations for environment variables or parameters with type 'password'
    Affected if Password-type environment variables or parameters are defined in the system
  5. Inspect logs for credential exposure
    Review TeamCity server logs (located in <TeamCity data directory>/logs, particularly teamcity-server.log and build logs) and search for occurrences of password parameter names or their values
    Affected if Log files contain values that match password-type environment variables

A user is affected if their TeamCity version is prior to 2022.04.4, they have a Perforce VCS root configured with a custom executable path, and password-type environment variables exist in the system or were used in builds, potentially exposing credentials in logs.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 2022.04.4 or later
Fixed in 2022.04.4
Interim mitigation

Upgrade TeamCity to version 2022.04.4 or later, which addresses the improper logging of password-type environment variables. Alternatively, audit existing logs for exposed credentials and rotate any compromised passwords.

Recommended fix High confidence

2022.04.4

  1. 1. Backup your current TeamCity configuration and database
  2. 2. Download TeamCity 2022.04.4 or later from the official JetBrains website
  3. 3. Stop the TeamCity server service
  4. 4. Install the updated version following the standard TeamCity upgrade procedure
  5. 5. Start the TeamCity server and verify all services are running correctly
  6. 6. Test that password-type environment variables are no longer logged when using custom Perforce executable
  7. 7. Review server logs to confirm the fix is working

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Teamcity Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing1.0 h
  • Review / QA1.0 h
5.0 hours of engineering $890
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,424.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-40979 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-40979 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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