Vulnerabilities in pkg:golang/github.com/shift72/caddy-geo-ip

PACKAGE
Advisory Identifier: GHSA-rxg9-hgq7-8pwx
Advisory Summary

CVE-2023-50463 is a MODERATE (CVSS 6.5) header spoofing vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Github.com/shift72/caddy geo ip libraries in the Go ecosystem. The issue involves header spoofing in caddy-geo-ip. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/shift72/caddy-geo-ip

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/shift72/caddy-geo-ip. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rxg9-hgq7-8pwx CVE-2023-50463 MODERATE Header spoofing in caddy-geo-ip

CVE-2023-50463 at a Glance

CVE Identifier CVE-2023-50463
GHSA Identifier GHSA-rxg9-hgq7-8pwx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Github.com/shift72/caddy geo ip
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:R/S:U/C:N/I:H/A:N).

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

How to Fix CVE-2023-50463

To remediate this vulnerability, upgrade all affected Github.com/shift72/caddy geo ip 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/shift72/caddy-geo-ip fixed: Latest secure release
Upgrade github.com/shift72/caddy-geo-ip to Latest secure release
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/shift72/caddy-geo-ip

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-50463, inspect your project dependencies for Github.com/shift72/caddy geo ip:

inspect dependencies for github.com/shift72/caddy-geo-ip

Analyze the terminal output to locate any version of Github.com/shift72/caddy geo ip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Github.com/shift72/caddy geo ip, 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

The caddy-geo-ip (aka GeoIP) middleware through 0.6.0 for Caddy 2, when trust_header X-Forwarded-For is used, allows attackers to spoof their source IP address via an X-Forwarded-For header, which may bypass a protection mechanism (trusted_proxy directive in reverse_proxy or IP address range restrictions).

CVE-2023-50463 Affected Github.com/shift72/caddy geo ip Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/shift72/caddy-geo-ip
Go
≤ 0.6.0

References

Frequently Asked Questions

What is CVE-2023-50463?
CVE-2023-50463 is a security vulnerability in Github.com/shift72/caddy geo ip involving Header spoofing in caddy-geo-ip under CWE-290: Authentication Bypass by Spoofing.
Which Github.com/shift72/caddy geo ip versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/shift72/caddy-geo-ip.
What version fixes CVE-2023-50463?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/shift72/caddy-geo-ip affected?
Yes, github.com/shift72/caddy-geo-ip is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-50463?
CVE-2023-50463 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2023-50463?
CVE-2023-50463 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check Go dependencies for CVE-2023-50463?
Run the dependency tree command: 'inspect dependencies for github.com/shift72/caddy-geo-ip'. 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-rxg9-hgq7-8pwx",
  "modified" : "2023-12-13T21:34:15Z",
  "published" : "2023-12-11T00:30:32Z",
  "aliases" : [ "CVE-2023-50463" ],
  "summary" : "Header spoofing in caddy-geo-ip",
  "details" : "The caddy-geo-ip (aka GeoIP) middleware through 0.6.0 for Caddy 2, when trust_header X-Forwarded-For is used, allows attackers to spoof their source IP address via an X-Forwarded-For header, which may bypass a protection mechanism (trusted_proxy directive in reverse_proxy or IP address range restrictions).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/shift72/caddy-geo-ip"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50463"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/shift72/caddy-geo-ip/issues/4"
  }, {
    "type" : "WEB",
    "url" : "https://caddyserver.com/v2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/shift72/caddy-geo-ip/tags"
  }, {
    "type" : "PACKAGE",
    "url" : "github.com/shift72/caddy-geo-ip"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-11T21:46:50Z",
    "nvd_published_at" : "2023-12-10T23:15:07Z"
  }
}