Vulnerabilities in pkg:golang/github.com/jkroepke/openvpn-auth-oauth2

PACKAGE
Advisory Identifier: GHSA-246w-jgmq-88fg
Advisory Summary

CVE-2026-41070 is a CRITICAL (CVSS 10.0) openvpn-auth-oauth2 returns func_success on client-deny, vulnerability (CWE-287: Improper Authentication) affecting Github.com/jkroepke/openvpn auth oauth2 libraries in the Go ecosystem. The issue involves openvpn-auth-oauth2 returns func_success on client-deny, allowing unauthenticated vpn access. Remediation is available by upgrading affected packages to version 1.27.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/jkroepke/openvpn-auth-oauth2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/jkroepke/openvpn-auth-oauth2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-246w-jgmq-88fg CVE-2026-41070 CRITICAL openvpn-auth-oauth2 returns FUNC_SUCCESS on client-deny, allowing unauthenticated VPN access

CVE-2026-41070 at a Glance

CVE Identifier CVE-2026-41070
GHSA Identifier GHSA-246w-jgmq-88fg
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/jkroepke/openvpn auth oauth2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 10.0

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

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

How to Fix CVE-2026-41070

To remediate this vulnerability, upgrade all affected Github.com/jkroepke/openvpn auth oauth2 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/jkroepke/openvpn-auth-oauth2 fixed: 1.27.3
Upgrade github.com/jkroepke/openvpn-auth-oauth2 to 1.27.3
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/jkroepke/openvpn-auth-oauth2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41070, inspect your project dependencies for Github.com/jkroepke/openvpn auth oauth2:

inspect dependencies for github.com/jkroepke/openvpn-auth-oauth2

Analyze the terminal output to locate any version of Github.com/jkroepke/openvpn auth oauth2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.27.3), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/jkroepke/openvpn auth oauth2, 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

# Summary When `openvpn-auth-oauth2` is deployed in the **experimental plugin mode** (shared library loaded by OpenVPN via the `plugin` directive), clients that do not support WebAuth/SSO (e.g., the `openvpn` CLI on Linux) are incorrectly admitted to the VPN despite being denied by the authentication logic. **The default management-interface mode is not affected** because it does not use the OpenVPN plugin return-code mechanism. # Impact **Authentication bypass — any VPN client that does not advertise WebAuth/SSO support (`IV_SSO=webauth`) is granted full network access without completing OIDC authentication.** This affects only deployments running the **experimental plugin mode** in versions 1.26.3 through 1.27.2. The default and recommended deployment via the management interface is **not affected**. An unauthenticated attacker can connect to the OpenVPN server using any standard OpenVPN client that does not support webauth (e.g., the Linux `openvpn` CLI). The plugin correctly issues a `client-deny` command via the management interface, but returns `OPENVPN_PLUGIN_FUNC_SUCCESS` (status=0) to OpenVPN. Because the `auth_control_file` content is only consulted when the plugin returns `FUNC_DEFERRED`, OpenVPN interprets status=0 as "authentication passed" and admits the client — granting full access to the internal network behind the VPN. ## Root Cause In `lib/openvpn-auth-oauth2/openvpn/handle.go`, the `ClientAuthDeny` branch of `handleAuthUserPassVerify` wrote `"0"` (deny) to the `auth_control_file` but returned `OPENVPN_PLUGIN_FUNC_SUCCESS`. OpenVPN only reads the `auth_control_file` when the plugin returns `FUNC_DEFERRED`; a synchronous `FUNC_SUCCESS` return is treated as immediate approval regardless of file contents. **Before fix:** ```go case management.ClientAuthDeny: // ... writes "0" to auth_control_file ... if err := openVPNClient.WriteToAuthFile("0"); err != nil { // only returned ERROR on write failure return c.OpenVPNPluginFuncError } return c.OpenVPNPluginFuncSuccess // ← BUG: OpenVPN sees this as "auth passed" ``` **After fix (commit [`36f69a6`](https://github.com/jkroepke/openvpn-auth-oauth2/commit/36f69a6c67c1054da7cbfa04ced3f0555127c8f2)):** ```go case management.ClientAuthDeny: // ... writes "0" to auth_control_file ... if err := openVPNClient.WriteToAuthFile("0"); err != nil { logger.ErrorContext(p.ctx, "write to auth file", slog.Any("err", err)) } return c.OpenVPNPluginFuncError // ← FIX: OpenVPN now correctly rejects the client ``` # Patches This vulnerability is fixed in **v1.27.3**. Users of the experimental plugin mode should upgrade immediately. - **Fix commit:** [`36f69a6`](https://github.com/jkroepke/openvpn-auth-oauth2/commit/36f69a6c67c1054da7cbfa04ced3f0555127c8f2) - **Fix PR:** [#829](https://github.com/jkroepke/openvpn-auth-oauth2/pull/829) # Workarounds - **Switch to standalone management client mode** (the default, non-plugin deployment). This mode is not affected by the vulnerability because authentication decisions are communicated entirely through the management interface protocol, not through the plugin return code. - **Restrict VPN access at the network level** to only clients known to support WebAuth/SSO (e.g., OpenVPN Connect 3+), although this is difficult to enforce reliably and is not recommended as a sole mitigation.

CVE-2026-41070 Affected Github.com/jkroepke/openvpn auth oauth2 Versions

1 component(s)
Fixed Versions:
1.27.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/jkroepke/openvpn-auth-oauth2
Go
≥ 1.26.3
< 1.27.3
1.27.3

References

Frequently Asked Questions

What is CVE-2026-41070?
CVE-2026-41070 is a security vulnerability in Github.com/jkroepke/openvpn auth oauth2 involving openvpn-auth-oauth2 returns FUNC_SUCCESS on client-deny, allowing unauthenticated VPN access under CWE-287: Improper Authentication.
Which Github.com/jkroepke/openvpn auth oauth2 versions are affected?
Affected versions include releases prior to 1.27.3 across affected packages: github.com/jkroepke/openvpn-auth-oauth2.
What version fixes CVE-2026-41070?
Upgrading to 1.27.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/jkroepke/openvpn-auth-oauth2 affected?
Yes, github.com/jkroepke/openvpn-auth-oauth2 is affected in releases prior to 1.27.3. Upgrade your dependency to 1.27.3 or later.
What is the CVSS score of CVE-2026-41070?
CVE-2026-41070 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-41070?
CVE-2026-41070 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2026-41070?
Run the dependency tree command: 'inspect dependencies for github.com/jkroepke/openvpn-auth-oauth2'. 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-246w-jgmq-88fg",
  "modified" : "2026-05-13T13:29:35Z",
  "published" : "2026-04-22T14:28:11Z",
  "aliases" : [ "CVE-2026-41070" ],
  "summary" : "openvpn-auth-oauth2 returns FUNC_SUCCESS on client-deny, allowing unauthenticated VPN access",
  "details" : "# Summary\n\nWhen `openvpn-auth-oauth2` is deployed in the **experimental plugin mode** (shared library loaded by OpenVPN via the `plugin` directive), clients that do not support WebAuth/SSO (e.g., the `openvpn` CLI on Linux) are incorrectly admitted to the VPN despite being denied by the authentication logic. **The default management-interface mode is not affected** because it does not use the OpenVPN plugin return-code mechanism.\n\n# Impact\n\n**Authentication bypass — any VPN client that does not advertise WebAuth/SSO support (`IV_SSO=webauth`) is granted full network access without completing OIDC authentication.**\n\nThis affects only deployments running the **experimental plugin mode** in versions 1.26.3 through 1.27.2. The default and recommended deployment via the management interface is **not affected**.\n\nAn unauthenticated attacker can connect to the OpenVPN server using any standard OpenVPN client that does not support webauth (e.g., the Linux `openvpn` CLI). The plugin correctly issues a `client-deny` command via the management interface, but returns `OPENVPN_PLUGIN_FUNC_SUCCESS` (status=0) to OpenVPN. Because the `auth_control_file` content is only consulted when the plugin returns `FUNC_DEFERRED`, OpenVPN interprets status=0 as \"authentication passed\" and admits the client — granting full access to the internal network behind the VPN.\n\n\n## Root Cause\n\nIn `lib/openvpn-auth-oauth2/openvpn/handle.go`, the `ClientAuthDeny` branch of `handleAuthUserPassVerify` wrote `\"0\"` (deny) to the `auth_control_file` but returned `OPENVPN_PLUGIN_FUNC_SUCCESS`. OpenVPN only reads the `auth_control_file` when the plugin returns `FUNC_DEFERRED`; a synchronous `FUNC_SUCCESS` return is treated as immediate approval regardless of file contents.\n\n**Before fix:**\n```go\ncase management.ClientAuthDeny:\n    // ... writes \"0\" to auth_control_file ...\n    if err := openVPNClient.WriteToAuthFile(\"0\"); err != nil {\n        // only returned ERROR on write failure\n        return c.OpenVPNPluginFuncError\n    }\n    return c.OpenVPNPluginFuncSuccess  // ← BUG: OpenVPN sees this as \"auth passed\"\n```\n\n**After fix (commit [`36f69a6`](https://github.com/jkroepke/openvpn-auth-oauth2/commit/36f69a6c67c1054da7cbfa04ced3f0555127c8f2)):**\n```go\ncase management.ClientAuthDeny:\n    // ... writes \"0\" to auth_control_file ...\n    if err := openVPNClient.WriteToAuthFile(\"0\"); err != nil {\n        logger.ErrorContext(p.ctx, \"write to auth file\", slog.Any(\"err\", err))\n    }\n    return c.OpenVPNPluginFuncError  // ← FIX: OpenVPN now correctly rejects the client\n```\n\n# Patches\n\nThis vulnerability is fixed in **v1.27.3**. Users of the experimental plugin mode should upgrade immediately.\n\n- **Fix commit:** [`36f69a6`](https://github.com/jkroepke/openvpn-auth-oauth2/commit/36f69a6c67c1054da7cbfa04ced3f0555127c8f2)\n- **Fix PR:** [#829](https://github.com/jkroepke/openvpn-auth-oauth2/pull/829)\n\n# Workarounds\n\n- **Switch to standalone management client mode** (the default, non-plugin deployment). This mode is not affected by the vulnerability because authentication decisions are communicated entirely through the management interface protocol, not through the plugin return code.\n- **Restrict VPN access at the network level** to only clients known to support WebAuth/SSO (e.g., OpenVPN Connect 3+), although this is difficult to enforce reliably and is not recommended as a sole mitigation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/jkroepke/openvpn-auth-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.26.3"
      }, {
        "fixed" : "1.27.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jkroepke/openvpn-auth-oauth2/security/advisories/GHSA-246w-jgmq-88fg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41070"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jkroepke/openvpn-auth-oauth2/pull/829"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jkroepke/openvpn-auth-oauth2/commit/36f69a6c67c1054da7cbfa04ced3f0555127c8f2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenVPN/openvpn/blob/master/include/openvpn-plugin.h.in"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenVPN/openvpn3/blob/master/doc/webauth.md"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jkroepke/openvpn-auth-oauth2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jkroepke/openvpn-auth-oauth2/releases/tag/v1.27.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-22T14:28:11Z",
    "nvd_published_at" : "2026-05-08T16:16:11Z"
  }
}