CVE-2017-16613: Swauth OpenStack Swauth Object/proxy Server Writing Vulnerability

CRITICAL
Advisory Identifier: GHSA-qhq8-xwqv-pvv9
CVSS 9.8
CWE-287
Published
Advisory Summary

CVE-2017-16613 is a CRITICAL (CVSS 9.8) openstack swauth object/proxy server writing vulnerability (CWE-287: Improper Authentication) affecting Swauth libraries in the PyPI ecosystem. The issue involves openstack swauth object/proxy server writing auth token to log file. Remediation is available by upgrading affected packages to version 1.3.0.

CVE-2017-16613 at a Glance

CVE Identifier CVE-2017-16613
GHSA Identifier GHSA-qhq8-xwqv-pvv9
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-287: Improper Authentication
Affected Product Swauth
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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 High (A:H)

How to Fix CVE-2017-16613

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

swauth fixed: 1.3.0
pip install swauth>=1.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:

pip show swauth

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2017-16613, inspect your installed packages using pip:

pip show swauth

Analyze the terminal output to locate any version of Swauth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.0), your application is affected.

Note: The pip show swauth command checks currently installed packages in your active Python environment.

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 Swauth, 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

An issue was discovered in middleware.py in OpenStack Swauth through 1.2.0 when used with OpenStack Swift through 2.15.1. The Swift object store and proxy server are saving (unhashed) tokens retrieved from the Swauth middleware authentication mechanism to a log file as part of a GET URI. This allows attackers to bypass authentication by inserting a token into an X-Auth-Token header of a new request. NOTE: github.com/openstack/swauth URLs do not mean that Swauth is maintained by an official OpenStack project team.

CVE-2017-16613 Affected Swauth Versions

1 component(s)
Fixed Versions:
1.3.0
Product / Package Ecosystem Affected Versions Fixed Version
swauth
PyPI
< 1.3.0
1.3.0

References

Frequently Asked Questions

What is CVE-2017-16613?
CVE-2017-16613 is a security vulnerability in Swauth involving OpenStack Swauth object/proxy server writing Auth Token to log file under CWE-287: Improper Authentication.
Which Swauth versions are affected?
Affected versions include releases prior to 1.3.0 across affected packages: swauth.
What version fixes CVE-2017-16613?
Upgrading to 1.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is swauth affected?
Yes, swauth is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
What is the CVSS score of CVE-2017-16613?
CVE-2017-16613 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-16613?
CVE-2017-16613 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 PyPI dependencies for CVE-2017-16613?
Run the dependency tree command: 'pip show swauth'. 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-qhq8-xwqv-pvv9",
  "modified" : "2024-10-28T14:39:52Z",
  "published" : "2022-05-17T00:16:14Z",
  "aliases" : [ "CVE-2017-16613" ],
  "summary" : "OpenStack Swauth object/proxy server writing Auth Token to log file",
  "details" : "An issue was discovered in middleware.py in OpenStack Swauth through 1.2.0 when used with OpenStack Swift through 2.15.1. The Swift object store and proxy server are saving (unhashed) tokens retrieved from the Swauth middleware authentication mechanism to a log file as part of a GET URI. This allows attackers to bypass authentication by inserting a token into an X-Auth-Token header of a new request. NOTE: github.com/openstack/swauth URLs do not mean that Swauth is maintained by an official OpenStack project team.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "swauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16613"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/swauth/commit/70af7986265a3defea054c46efc82d0698917298"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882314"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/swift/+bug/1655781"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openstack/swauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/swauth/PYSEC-2017-84.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227140059/http://www.securityfocus.com/bid/101926"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2017/dsa-4044"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-01T11:24:02Z",
    "nvd_published_at" : "2017-11-21T13:29:00Z"
  }
}