CVE-2023-27582: Github.com/foxcpp/maddy Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-4g76-w3xw-2x6w
CVSS 9.1
CWE-287
Published
Advisory Summary

CVE-2023-27582 is a CRITICAL (CVSS 9.1) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Github.com/foxcpp/maddy libraries in the Go ecosystem. The issue involves full authentication bypass if sasl authorization username is specified. Remediation is available by upgrading affected packages to version 0.6.3.

CVE-2023-27582 at a Glance

CVE Identifier CVE-2023-27582
GHSA Identifier GHSA-4g76-w3xw-2x6w
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/foxcpp/maddy
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.1

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: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 Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-27582

To remediate this vulnerability, upgrade all affected Github.com/foxcpp/maddy 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/foxcpp/maddy fixed: 0.6.3
Upgrade github.com/foxcpp/maddy to 0.6.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/foxcpp/maddy

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-27582, inspect your project dependencies for Github.com/foxcpp/maddy:

inspect dependencies for github.com/foxcpp/maddy

Analyze the terminal output to locate any version of Github.com/foxcpp/maddy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.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/foxcpp/maddy, 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 maddy 0.2.0 - 0.6.2 allows a full authentication bypass if SASL authorization username is specified when using the PLAIN authentication mechanisms. Instead of validating the specified authorization username, it is accepted as is after checking the credentials for the authentication username. ### Patches maddy 0.6.3 includes the fix for the bug. ### Workarounds There is no way to fix the issue without upgrading. ### References * Commit that introduced the vulnerable code: https://github.com/foxcpp/maddy/commit/55a91a37b71210f34f98f4d327c30308fe24399a * Fix: https://github.com/foxcpp/maddy/commit/9f58cb64b39cdc01928ec463bdb198c4c2313a9c

CVE-2023-27582 Affected Github.com/foxcpp/maddy Versions

1 component(s)
Fixed Versions:
0.6.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/foxcpp/maddy
Go
≥ 0.2.0
< 0.6.3
0.6.3

References

Frequently Asked Questions

What is CVE-2023-27582?
CVE-2023-27582 is a security vulnerability in Github.com/foxcpp/maddy involving Full authentication bypass if SASL authorization username is specified under CWE-287: Improper Authentication.
Which Github.com/foxcpp/maddy versions are affected?
Affected versions include releases prior to 0.6.3 across affected packages: github.com/foxcpp/maddy.
What version fixes CVE-2023-27582?
Upgrading to 0.6.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/foxcpp/maddy affected?
Yes, github.com/foxcpp/maddy is affected in releases prior to 0.6.3. Upgrade your dependency to 0.6.3 or later.
What is the CVSS score of CVE-2023-27582?
CVE-2023-27582 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-27582?
CVE-2023-27582 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-2023-27582?
Run the dependency tree command: 'inspect dependencies for github.com/foxcpp/maddy'. 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-4g76-w3xw-2x6w",
  "modified" : "2023-03-14T18:03:22Z",
  "published" : "2023-03-14T18:03:22Z",
  "aliases" : [ "CVE-2023-27582" ],
  "summary" : "Full authentication bypass if SASL authorization username is specified",
  "details" : "### Impact\n\nmaddy 0.2.0 - 0.6.2 allows a full authentication bypass if SASL authorization username is specified when using the PLAIN authentication mechanisms. Instead of validating the specified authorization username, it is accepted as is after checking the credentials for the authentication username.\n\n### Patches\n\nmaddy 0.6.3 includes the fix for the bug. \n\n### Workarounds\n\nThere is no way to fix the issue without upgrading.\n\n### References\n\n* Commit that introduced the vulnerable code: https://github.com/foxcpp/maddy/commit/55a91a37b71210f34f98f4d327c30308fe24399a\n* Fix: https://github.com/foxcpp/maddy/commit/9f58cb64b39cdc01928ec463bdb198c4c2313a9c\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/foxcpp/maddy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0"
      }, {
        "fixed" : "0.6.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/foxcpp/maddy/security/advisories/GHSA-4g76-w3xw-2x6w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-27582"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/foxcpp/maddy/commit/55a91a37b71210f34f98f4d327c30308fe24399a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/foxcpp/maddy/commit/9f58cb64b39cdc01928ec463bdb198c4c2313a9c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/foxcpp/maddy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/foxcpp/maddy/releases/tag/v0.6.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-14T18:03:22Z",
    "nvd_published_at" : "2023-03-13T22:15:00Z"
  }
}