GHSA-857q-xmph-p2v5: S2n tls S2n-tls's MTLS API Ordering May Vulnerability

MODERATE
CVSS 4.8
CWE-287
Published
Advisory Summary

GHSA-857q-xmph-p2v5 is a MODERATE (CVSS 4.8) s2n-tls's mtls api ordering may vulnerability (CWE-287: Improper Authentication) affecting S2n tls libraries in the crates.io ecosystem. The issue involves s2n-tls's mtls api ordering may skip client authentication. Remediation is available by upgrading affected packages to version 0.3.0.

GHSA-857q-xmph-p2v5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-857q-xmph-p2v5
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-287: Improper Authentication
Affected Product S2n tls
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.8

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

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

How to Fix GHSA-857q-xmph-p2v5

To remediate this vulnerability, upgrade all affected S2n tls dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

s2n-tls fixed: 0.3.0
Upgrade s2n-tls to 0.3.0
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 s2n-tls

How to Check if You Are Affected

To determine whether your application is affected by GHSA-857q-xmph-p2v5, inspect your project dependencies for S2n tls:

inspect dependencies for s2n-tls

Analyze the terminal output to locate any version of S2n tls in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.0), 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 S2n tls, 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 An API ordering issue in s2n-tls can cause client authentication to unexpectedly not be enabled on the server when it otherwise appears to be. Server applications are impacted if client authentication is enabled by calling s2n_connection_set_config() before calling s2n_connection_set_client_auth_type(). Applications are not impacted if these APIs are called in the opposite order, or if client authentication is enabled on the config with s2n_config_set_client_auth_type(). s2n-tls clients verifying server certificates are not impacted. Impacted versions: < v1.5.0. ### Patches The patch is included in v1.5.0 [1]. ### Workarounds Applications can workaround this issue by calling s2n_connection_set_config() after calling s2n_connection_set_client_auth_type(), or by enabling client authentication on the config with s2n_config_set_client_auth_type(). If you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. [1] https://github.com/aws/s2n-tls/releases/tag/v1.5.0 [2] https://aws.amazon.com/security/vulnerability-reporting

GHSA-857q-xmph-p2v5 Affected S2n tls Versions

1 component(s)
Fixed Versions:
0.3.0
Product / Package Ecosystem Affected Versions Fixed Version
s2n-tls
crates.io
< 0.3.0
0.3.0

References

Frequently Asked Questions

What is GHSA-857q-xmph-p2v5?
GHSA-857q-xmph-p2v5 is a security vulnerability in S2n tls involving s2n-tls's mTLS API ordering may skip client authentication under CWE-287: Improper Authentication.
Which S2n tls versions are affected?
Affected versions include releases prior to 0.3.0 across affected packages: s2n-tls.
What version fixes GHSA-857q-xmph-p2v5?
Upgrading to 0.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is s2n-tls affected?
Yes, s2n-tls is affected in releases prior to 0.3.0. Upgrade your dependency to 0.3.0 or later.
What is the CVSS score of GHSA-857q-xmph-p2v5?
GHSA-857q-xmph-p2v5 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with GHSA-857q-xmph-p2v5?
GHSA-857q-xmph-p2v5 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 crates.io dependencies for GHSA-857q-xmph-p2v5?
Run the dependency tree command: 'inspect dependencies for s2n-tls'. 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-857q-xmph-p2v5",
  "modified" : "2024-08-09T20:41:39Z",
  "published" : "2024-08-09T20:41:38Z",
  "aliases" : [ ],
  "summary" : "s2n-tls's mTLS API ordering may skip client authentication",
  "details" : "### Impact\n\nAn API ordering issue in s2n-tls can cause client authentication to unexpectedly not be enabled on the server when it otherwise appears to be. Server applications are impacted if client authentication is enabled by calling s2n_connection_set_config() before calling s2n_connection_set_client_auth_type().\n\nApplications are not impacted if these APIs are called in the opposite order, or if client authentication is enabled on the config with s2n_config_set_client_auth_type(). s2n-tls clients verifying server certificates are not impacted.\n\nImpacted versions: < v1.5.0.\n\n\n### Patches\n\nThe patch is included in v1.5.0 [1].\n\n\n### Workarounds\n\nApplications can workaround this issue by calling s2n_connection_set_config() after calling s2n_connection_set_client_auth_type(), or by enabling client authentication on the config with s2n_config_set_client_auth_type().\n\nIf you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n[1] https://github.com/aws/s2n-tls/releases/tag/v1.5.0\n\n[2] https://aws.amazon.com/security/vulnerability-reporting",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "s2n-tls"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/s2n-tls/security/advisories/GHSA-857q-xmph-p2v5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/s2n-tls/commit/e8ca8911c5b2f2361687dec1467c45cd54d00b3f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/s2n-tls"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-09T20:41:38Z",
    "nvd_published_at" : null
  }
}