CVE-2022-31162: Slack morphism Slack Morphism For Rust Before Vulnerability

HIGH
Advisory Identifier: GHSA-99j7-mhfh-w84p
CVSS 7.5
CWE-212 CWE-200 CWE-1258
Published
Advisory Summary

CVE-2022-31162 is a HIGH (CVSS 7.5) slack morphism for rust before vulnerability (CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer) affecting Slack morphism libraries in the crates.io ecosystem. The issue involves slack morphism for rust before 0.41.0 can leak slack oauth client information in application debug logs. Remediation is available by upgrading affected packages to version 0.41.0.

CVE-2022-31162 at a Glance

CVE Identifier CVE-2022-31162
GHSA Identifier GHSA-99j7-mhfh-w84p
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer
Affected Product Slack morphism
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/S:U/C:H/I:N/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 None (I:N)
Availability None (A:N)

How to Fix CVE-2022-31162

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

slack-morphism fixed: 0.41.0
Upgrade slack-morphism to 0.41.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 slack-morphism

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-31162, inspect your project dependencies for Slack morphism:

inspect dependencies for slack-morphism

Analyze the terminal output to locate any version of Slack morphism in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.41.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-212: Improper Removal of Sensitive Information Before Storage or Transfer, where the product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors. In Slack morphism, 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 Potential/accidental leaking of Slack OAuth client information in application debug logs. ### Patches More strict and secure debug formatting was introduced in v0.41 for OAuth secret types to avoid the possibility of printing sensitive information in application logs. ### Workarounds Don't print/output in logs request and responses for OAuth and client configurations. ### For more information If you have any questions or comments about this advisory: * Open an issue in the [repo](https://github.com/abdolence/slack-morphism-rust) * Email us at [me@abdolence.dev](mailto:me@abdolence.dev)

CVE-2022-31162 Affected Slack morphism Versions

1 component(s)
Fixed Versions:
0.41.0
Product / Package Ecosystem Affected Versions Fixed Version
slack-morphism
crates.io
< 0.41.0
0.41.0

References

Frequently Asked Questions

What is CVE-2022-31162?
CVE-2022-31162 is a security vulnerability in Slack morphism involving Slack Morphism for Rust before 0.41.0 can leak Slack OAuth client information in application debug logs under CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer.
Which Slack morphism versions are affected?
Affected versions include releases prior to 0.41.0 across affected packages: slack-morphism.
What version fixes CVE-2022-31162?
Upgrading to 0.41.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is slack-morphism affected?
Yes, slack-morphism is affected in releases prior to 0.41.0. Upgrade your dependency to 0.41.0 or later.
What is the CVSS score of CVE-2022-31162?
CVE-2022-31162 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-31162?
CVE-2022-31162 is classified under CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer (The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.).
How can I check crates.io dependencies for CVE-2022-31162?
Run the dependency tree command: 'inspect dependencies for slack-morphism'. 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-99j7-mhfh-w84p",
  "modified" : "2022-08-10T23:31:07Z",
  "published" : "2022-07-20T01:30:21Z",
  "aliases" : [ "CVE-2022-31162" ],
  "summary" : "Slack Morphism for Rust before 0.41.0 can leak Slack OAuth client information in application debug logs",
  "details" : "### Impact\nPotential/accidental leaking of Slack OAuth client information in application debug logs.\n\n### Patches\nMore strict and secure debug formatting was introduced in v0.41 for OAuth secret types to avoid the possibility of printing sensitive information in application logs.\n\n### Workarounds\nDon't print/output in logs request and responses for OAuth and client configurations.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in the [repo](https://github.com/abdolence/slack-morphism-rust)\n* Email us at [me@abdolence.dev](mailto:me@abdolence.dev)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "slack-morphism"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.41.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/abdolence/slack-morphism-rust/security/advisories/GHSA-99j7-mhfh-w84p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31162"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/abdolence/slack-morphism-rust/pull/133"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/abdolence/slack-morphism-rust/commit/4923fb7d458ed28c0302244c54cb4df0acee7ee6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/abdolence/slack-morphism-rust"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/abdolence/slack-morphism-rust/releases/tag/v0.41.0"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0086.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1258", "CWE-200", "CWE-212" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-20T01:30:21Z",
    "nvd_published_at" : "2022-07-22T04:15:00Z"
  }
}