CVE-2026-42876: Github.com/external secrets/external secrets/apis ExternalSecrets Vulnerable To Privilege Escalation Vulnerability

MODERATE
Advisory Identifier: GHSA-fq7h-9x26-6j22
CVSS 4.9
CWE-285
Published
Advisory Summary

CVE-2026-42876 is a MODERATE (CVSS 4.9) externalsecrets vulnerable to privilege escalation vulnerability (CWE-285: Improper Authorization) affecting Github.com/external secrets/external secrets/apis libraries in the Go ecosystem. The issue involves externalsecrets vulnerable to privilege escalation with secret overwriting. Remediation is available by upgrading affected packages to version 2.4.1.

CVE-2026-42876 at a Glance

CVE Identifier CVE-2026-42876
GHSA Identifier GHSA-fq7h-9x26-6j22
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-285: Improper Authorization
Affected Product Github.com/external secrets/external secrets/apis
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.9

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:C/C:L/I:L/A:N).

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

How to Fix CVE-2026-42876

To remediate this vulnerability, upgrade all affected Github.com/external secrets/external secrets/apis 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/external-secrets/external-secrets/apis fixed: 2.4.1
Upgrade github.com/external-secrets/external-secrets/apis to 2.4.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/external-secrets/external-secrets/apis

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42876, inspect your project dependencies for Github.com/external secrets/external secrets/apis:

inspect dependencies for github.com/external-secrets/external-secrets/apis

Analyze the terminal output to locate any version of Github.com/external secrets/external secrets/apis in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Github.com/external secrets/external secrets/apis, 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

ExternalSecrets allows users to craft Service Account tokens for misconfigured Service Accounts in namespaces the users have access to. ### Impact A user who only has permission to create ExternalSecret resources can cause the operator to create a Secret that Kubernetes will automatically populate with a long-lived token for the sepcified service account. This effectively allows the user to impersonate any service account in the namespace without needing direct create permissions on TokenRequest or Secrets of that type. The problem is mitigated in severity by the fact that the user must have pre-existing permissions already at almost the same level as the escalation later gives. The attacker cannot use this method to gain access to more information without other things also being misconfigured in the ESO installation. ### Patches Disallow this combination including the bootstrap token secret type. ### Workarounds * Add admission control logic to prevent the use of Templates targeting undesired Types * Remove Service Account Token generation via kube-controller-manager flags * Restrict User RBAC on production clusters and sensitive namespaces

CVE-2026-42876 Affected Github.com/external secrets/external secrets/apis Versions

1 component(s)
Fixed Versions:
2.4.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/external-secrets/external-secrets/apis
Go
≥ 0.1.0
< 2.4.1
2.4.1

References

Frequently Asked Questions

What is CVE-2026-42876?
CVE-2026-42876 is a security vulnerability in Github.com/external secrets/external secrets/apis involving ExternalSecrets vulnerable to privilege escalation with secret overwriting under CWE-285: Improper Authorization.
Which Github.com/external secrets/external secrets/apis versions are affected?
Affected versions include releases prior to 2.4.1 across affected packages: github.com/external-secrets/external-secrets/apis.
What version fixes CVE-2026-42876?
Upgrading to 2.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/external-secrets/external-secrets/apis affected?
Yes, github.com/external-secrets/external-secrets/apis is affected in releases prior to 2.4.1. Upgrade your dependency to 2.4.1 or later.
What is the CVSS score of CVE-2026-42876?
CVE-2026-42876 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-42876?
CVE-2026-42876 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-42876?
Run the dependency tree command: 'inspect dependencies for github.com/external-secrets/external-secrets/apis'. 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-fq7h-9x26-6j22",
  "modified" : "2026-05-13T14:19:10Z",
  "published" : "2026-05-08T17:24:15Z",
  "aliases" : [ "CVE-2026-42876" ],
  "summary" : "ExternalSecrets vulnerable to privilege escalation with secret overwriting",
  "details" : "ExternalSecrets allows users to craft Service Account tokens for misconfigured Service Accounts in namespaces the users have access to.\n\n### Impact\n\nA user who only has permission to create ExternalSecret resources can cause the operator to create a Secret that Kubernetes will automatically populate with a long-lived token for the sepcified service account. This effectively allows the user to impersonate any service account in the namespace without needing direct create permissions on TokenRequest or Secrets of that type.\n\nThe problem is mitigated in severity by the fact that the user must have pre-existing permissions already at almost the same level as the escalation later gives. The attacker cannot use this method to gain access to more information without other things also being misconfigured in the ESO installation.\n\n### Patches\n\nDisallow this combination including the bootstrap token secret type.\n\n### Workarounds\n\n* Add admission control logic to prevent the use of Templates targeting undesired Types\n* Remove Service Account Token generation via kube-controller-manager flags\n* Restrict User RBAC on production clusters and sensitive namespaces",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/external-secrets/external-secrets/apis"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.0"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/security/advisories/GHSA-fq7h-9x26-6j22"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42876"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/commit/4ddd240af7fe88725d9857b9a0c198073502e288"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/external-secrets/external-secrets"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/releases/tag/v2.4.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T17:24:15Z",
    "nvd_published_at" : "2026-05-11T20:25:44Z"
  }
}