CVE-2021-29651: Github.com/pomerium/pomerium JWT Leak Vulnerability

MODERATE
Advisory Identifier: GHSA-35vc-w93w-75c2
CVSS 6.3
CWE-601 CWE-200
Published
Advisory Summary

CVE-2021-29651 is a MODERATE (CVSS 6.3) jwt leak vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Github.com/pomerium/pomerium libraries in the Go ecosystem. The issue involves jwt leak via open redirect in programmatic access. Remediation is available by upgrading affected packages to version 0.13.4.

CVE-2021-29651 at a Glance

CVE Identifier CVE-2021-29651
GHSA Identifier GHSA-35vc-w93w-75c2
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Github.com/pomerium/pomerium
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.3

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

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

How to Fix CVE-2021-29651

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

github.com/pomerium/pomerium fixed: 0.13.4
Upgrade github.com/pomerium/pomerium to 0.13.4
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 github.com/pomerium/pomerium

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-29651, inspect your project dependencies for Github.com/pomerium/pomerium:

inspect dependencies for github.com/pomerium/pomerium

Analyze the terminal output to locate any version of Github.com/pomerium/pomerium in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.4), 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Github.com/pomerium/pomerium, 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

### Impact Using programmatic access on protected sites, one can get a signed login URL with pomerium_redirect_uri set to an arbitrary URL. Then, if the user has already logged into Pomerium, they will be redirected to the specified pomerium_redirect_uri with a JWT attached. This allows an outside attacker to get a signed login URL that, upon visiting it, will redirect a victim to the attacker’s site. This creates an issue of Open Redirect and, more seriously, JWT leakage. With a leaked JWT, the attacker will be able to unveil the victim’s identity (.e.g. email address) by supplying the JWT to the authenticate service or verify.pomerium.com. In addition, if an application integrating Pomerium only verifies the iss claim and others but not the aud claim, the attacker will be able to access it as the victim. ### Specific Go Packages Affected github.com/pomerium/pomerium/proxy ### Patches Patched in Pomerium v0.13.4 ### For more information If you have any questions or comments about this advisory * Open an issue in [pomerium](http://github.com/pomerium/pomerium) * Email us at [security@pomerium.com](mailto:security@pomerium.com)

CVE-2021-29651 Affected Github.com/pomerium/pomerium Versions

1 component(s)
Fixed Versions:
0.13.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/pomerium/pomerium
Go
< 0.13.4
0.13.4

References

Frequently Asked Questions

What is CVE-2021-29651?
CVE-2021-29651 is a security vulnerability in Github.com/pomerium/pomerium involving JWT leak via Open Redirect in Programmatic access under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Github.com/pomerium/pomerium versions are affected?
Affected versions include releases prior to 0.13.4 across affected packages: github.com/pomerium/pomerium.
What version fixes CVE-2021-29651?
Upgrading to 0.13.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/pomerium/pomerium affected?
Yes, github.com/pomerium/pomerium is affected in releases prior to 0.13.4. Upgrade your dependency to 0.13.4 or later.
What is the CVSS score of CVE-2021-29651?
CVE-2021-29651 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2021-29651?
CVE-2021-29651 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Go dependencies for CVE-2021-29651?
Run the dependency tree command: 'inspect dependencies for github.com/pomerium/pomerium'. 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-35vc-w93w-75c2",
  "modified" : "2023-10-02T12:09:08Z",
  "published" : "2021-05-21T16:24:34Z",
  "aliases" : [ "CVE-2021-29651" ],
  "summary" : "JWT leak via Open Redirect in Programmatic access",
  "details" : "### Impact\nUsing programmatic access on protected sites, one can get a signed login URL with pomerium_redirect_uri set to an arbitrary URL. Then, if the user has already logged into Pomerium, they will be redirected to the specified pomerium_redirect_uri with a JWT attached. This allows an outside attacker to get a signed login URL that, upon visiting it, will redirect a victim to the attacker’s site. This creates an issue of Open Redirect and, more seriously, JWT leakage.\n\nWith a leaked JWT, the attacker will be able to unveil the victim’s identity (.e.g. email address) by supplying the JWT to the authenticate service or verify.pomerium.com. In addition, if an application integrating Pomerium only verifies the iss claim and others but not the aud claim, the attacker will be able to access it as the victim.\n\n### Specific Go Packages Affected\ngithub.com/pomerium/pomerium/proxy\n\n### Patches\nPatched in Pomerium v0.13.4\n\n### For more information\nIf you have any questions or comments about this advisory\n* Open an issue in [pomerium](http://github.com/pomerium/pomerium)\n* Email us at [security@pomerium.com](mailto:security@pomerium.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/pomerium/pomerium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.13.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pomerium/pomerium/security/advisories/GHSA-35vc-w93w-75c2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29651"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pomerium/pomerium/pull/2049"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-20T20:25:40Z",
    "nvd_published_at" : null
  }
}