CVE-2024-47616: Github.com/pomerium/pomerium Pomerium Service Account Access Token Vulnerability

HIGH
Advisory Identifier: GHSA-r7rh-jww5-5fjr
CVSS 6.8
CWE-863
Published
Advisory Summary

CVE-2024-47616 is a HIGH (CVSS 6.8) pomerium service account access token vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/pomerium/pomerium libraries in the Go ecosystem. The issue involves pomerium service account access token may grant unintended access to databroker api. Remediation is available by upgrading affected packages to version 0.27.1.

CVE-2024-47616 at a Glance

CVE Identifier CVE-2024-47616
GHSA Identifier GHSA-r7rh-jww5-5fjr
Severity HIGH
CVSS v3.1 Base Score 6.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/pomerium/pomerium
Package Ecosystem Go
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:L/UI:N/S:U/C:H/I:H/A:N).

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

How to Fix CVE-2024-47616

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.27.1
Upgrade github.com/pomerium/pomerium to 0.27.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 github.com/pomerium/pomerium

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-47616, 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.27.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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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 We've identified a vulnerability in the Pomerium databroker service API that may grant unintended access under specific conditions. This affects only certain Pomerium Zero and Pomerium Enterprise deployments. #### Who is affected? A Pomerium deployment is susceptible to this issue if _all_ of the following conditions are met: - You have issued a [service account](https://www.pomerium.com/docs/capabilities/service-accounts) access token using Pomerium Zero or Pomerium Enterprise. - The access token has an explicit expiration date in the future. - The core Pomerium databroker gRPC API is not otherwise secured by network access controls. If your deployment does not meet _all_ of these conditions, you are not affected by this vulnerability. #### Details The Pomerium databroker service is responsible for managing all persistent Pomerium application state. Requests to the databroker service API are authorized by the presence of a JSON Web Token (JWT) signed by a key known by all Pomerium services in the same deployment. However, incomplete validation of this JWT meant that some service account access tokens would incorrectly be treated as valid for the purpose of databroker API authorization. Improper access to the databroker API could allow exfiltration of user info, spoofing of user sessions, or tampering with Pomerium routes, policies, and other settings. #### Discovery This issue was discovered during internal review. At this time we have no evidence to suggest that this vulnerability has been exploited in the wild. ### Patches We have released [Pomerium v0.27.1](https://github.com/pomerium/pomerium/releases/tag/v0.27.1) which includes a fix for the JWT validation logic. All affected users are strongly encouraged to upgrade to this version. ### Workarounds If you cannot upgrade immediately, consider the following mitigations: - Network access controls: Restrict access to the Pomerium internal gRPC API by configuring your network firewall or security groups to limit access to trusted sources only. Ensure that the port specified in the [`grpc_address`](https://www.pomerium.com/docs/reference/grpc#grpc-address) setting is not exposed to unauthorized networks. - _For Pomerium Zero deployments only:_ As of Pomerium v0.26.0, you can disable the gRPC API listener by setting `grpc_address: ""` in your YAML configuration file. In all-in-one mode, Pomerium does not require the internal gRPC API to be exposed beyond localhost. ### For more information If you have questions or need further assistance: - Open an issue in the [pomerium/pomerium](https://github.com/pomerium/pomerium/issues) repository. - Contact us at [security@pomerium.com](mailto:security@pomerium.com).

CVE-2024-47616 Affected Github.com/pomerium/pomerium Versions

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

References

Frequently Asked Questions

What is CVE-2024-47616?
CVE-2024-47616 is a security vulnerability in Github.com/pomerium/pomerium involving Pomerium service account access token may grant unintended access to databroker API under CWE-863: Incorrect Authorization.
Which Github.com/pomerium/pomerium versions are affected?
Affected versions include releases prior to 0.27.1 across affected packages: github.com/pomerium/pomerium.
What version fixes CVE-2024-47616?
Upgrading to 0.27.1 (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.27.1. Upgrade your dependency to 0.27.1 or later.
What is the CVSS score of CVE-2024-47616?
CVE-2024-47616 has a CVSS v3.1 base score of 6.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-47616?
CVE-2024-47616 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2024-47616?
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-r7rh-jww5-5fjr",
  "modified" : "2024-10-09T22:47:38Z",
  "published" : "2024-10-02T21:33:11Z",
  "aliases" : [ "CVE-2024-47616" ],
  "summary" : "Pomerium service account access token may grant unintended access to databroker API",
  "details" : "### Impact\n\nWe've identified a vulnerability in the Pomerium databroker service API that may grant unintended access under specific conditions. This affects only certain Pomerium Zero and Pomerium Enterprise deployments.\n\n#### Who is affected?\n\nA Pomerium deployment is susceptible to this issue if _all_ of the following conditions are met:\n- You have issued a [service account](https://www.pomerium.com/docs/capabilities/service-accounts) access token using Pomerium Zero or Pomerium Enterprise.\n- The access token has an explicit expiration date in the future.\n- The core Pomerium databroker gRPC API is not otherwise secured by network access controls.\n\nIf your deployment does not meet _all_ of these conditions, you are not affected by this vulnerability.\n\n#### Details\n\nThe Pomerium databroker service is responsible for managing all persistent Pomerium application state. Requests to the databroker service API are authorized by the presence of a JSON Web Token (JWT) signed by a key known by all Pomerium services in the same deployment. However, incomplete validation of this JWT meant that some service account access tokens would incorrectly be treated as valid for the purpose of databroker API authorization.\n\nImproper access to the databroker API could allow exfiltration of user info, spoofing of user sessions, or tampering with Pomerium routes, policies, and other settings.\n\n#### Discovery\n\nThis issue was discovered during internal review. At this time we have no evidence to suggest that this vulnerability has been exploited in the wild.\n\n### Patches\n\nWe have released [Pomerium v0.27.1](https://github.com/pomerium/pomerium/releases/tag/v0.27.1) which includes a fix for the JWT validation logic. All affected users are strongly encouraged to upgrade to this version.\n\n### Workarounds\n\nIf you cannot upgrade immediately, consider the following mitigations:\n\n- Network access controls: Restrict access to the Pomerium internal gRPC API by configuring your network firewall or security groups to limit access to trusted sources only. Ensure that the port specified in the [`grpc_address`](https://www.pomerium.com/docs/reference/grpc#grpc-address) setting is not exposed to unauthorized networks.\n\n- _For Pomerium Zero deployments only:_ As of Pomerium v0.26.0, you can disable the gRPC API listener by setting `grpc_address: \"\"` in your YAML configuration file. In all-in-one mode, Pomerium does not require the internal gRPC API to be exposed beyond localhost.\n\n### For more information\nIf you have questions or need further assistance:\n\n- Open an issue in the [pomerium/pomerium](https://github.com/pomerium/pomerium/issues) repository.\n- Contact us at [security@pomerium.com](mailto:security@pomerium.com).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/pomerium/pomerium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.27.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pomerium/pomerium/security/advisories/GHSA-r7rh-jww5-5fjr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47616"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pomerium/pomerium/commit/e018cf0fc0979d2abe25ff705db019feb7523444"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pomerium/pomerium"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pomerium/pomerium/releases/tag/v0.27.1"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3179"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-02T21:33:11Z",
    "nvd_published_at" : "2024-10-02T22:15:03Z"
  }
}