CVE-2023-45292: Github.com/mojocn/base64Captcha Always Incorrect Control Flow Vulnerability

MODERATE
Advisory Identifier: GHSA-5mmw-p5qv-w3x5
CVSS 5.3
CWE-345 CWE-670
Published
Advisory Summary

CVE-2023-45292 is a MODERATE (CVSS 5.3) always incorrect control flow vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Github.com/mojocn/base64Captcha libraries in the Go ecosystem. The issue involves always incorrect control flow in github.com/mojocn/base64captcha. Remediation is available by upgrading affected packages to version 1.3.6.

CVE-2023-45292 at a Glance

CVE Identifier CVE-2023-45292
GHSA Identifier GHSA-5mmw-p5qv-w3x5
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Github.com/mojocn/base64Captcha
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2023-45292

To remediate this vulnerability, upgrade all affected Github.com/mojocn/base64Captcha 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/mojocn/base64Captcha fixed: 1.3.6
Upgrade github.com/mojocn/base64Captcha to 1.3.6
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/mojocn/base64Captcha

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-45292, inspect your project dependencies for Github.com/mojocn/base64Captcha:

inspect dependencies for github.com/mojocn/base64Captcha

Analyze the terminal output to locate any version of Github.com/mojocn/base64Captcha in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.6), 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-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Github.com/mojocn/base64Captcha, 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

When using the default implementation of Verify to check a Captcha, verification can be bypassed. For example, if the first parameter is a non-existent id, the second parameter is an empty string, and the third parameter is true, the function will always consider the Captcha to be correct.

CVE-2023-45292 Affected Github.com/mojocn/base64Captcha Versions

1 component(s)
Fixed Versions:
1.3.6
Product / Package Ecosystem Affected Versions Fixed Version
github.com/mojocn/base64Captcha
Go
< 1.3.6
1.3.6

References

Frequently Asked Questions

What is CVE-2023-45292?
CVE-2023-45292 is a security vulnerability in Github.com/mojocn/base64Captcha involving Always incorrect control flow in github.com/mojocn/base64Captcha under CWE-345: Insufficient Verification of Data Authenticity.
Which Github.com/mojocn/base64Captcha versions are affected?
Affected versions include releases prior to 1.3.6 across affected packages: github.com/mojocn/base64Captcha.
What version fixes CVE-2023-45292?
Upgrading to 1.3.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/mojocn/base64Captcha affected?
Yes, github.com/mojocn/base64Captcha is affected in releases prior to 1.3.6. Upgrade your dependency to 1.3.6 or later.
What is the CVSS score of CVE-2023-45292?
CVE-2023-45292 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2023-45292?
CVE-2023-45292 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check Go dependencies for CVE-2023-45292?
Run the dependency tree command: 'inspect dependencies for github.com/mojocn/base64Captcha'. 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-5mmw-p5qv-w3x5",
  "modified" : "2023-12-14T22:03:11Z",
  "published" : "2023-12-12T00:30:17Z",
  "aliases" : [ "CVE-2023-45292" ],
  "summary" : "Always incorrect control flow in github.com/mojocn/base64Captcha",
  "details" : "When using the default implementation of Verify to check a Captcha, verification can be bypassed. For example, if the first parameter is a non-existent id, the second parameter is an empty string, and the third parameter is true, the function will always consider the Captcha to be correct.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/mojocn/base64Captcha"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45292"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mojocn/base64Captcha/issues/120"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mojocn/base64Captcha/commit/5ab86bd6f333aad3936f912fc52b411168dcd4a7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mojocn/base64Captcha/commit/9b11012caca58925f1e47c770f79f2fa47e3ad13"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mojocn/base64Captcha"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2023-2386"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-670" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-12T18:09:52Z",
    "nvd_published_at" : "2023-12-11T22:15:06Z"
  }
}