Vulnerabilities in pkg:nuget/Gw2Sharp

PACKAGE
Advisory Summary

GHSA-4vr3-9v7h-5f8v is a LOW low severity vulnerability that affects vulnerability (General Security Weakness) affecting Gw2Sharp libraries in the NuGet ecosystem. The issue involves low severity vulnerability that affects gw2sharp. Remediation is available by upgrading affected packages to version 0.3.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/Gw2Sharp

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/Gw2Sharp. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4vr3-9v7h-5f8v - LOW Low severity vulnerability that affects Gw2Sharp

GHSA-4vr3-9v7h-5f8v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4vr3-9v7h-5f8v
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Gw2Sharp
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix GHSA-4vr3-9v7h-5f8v

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

Gw2Sharp fixed: 0.3.1
Upgrade Gw2Sharp to 0.3.1
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 Gw2Sharp

How to Check if You Are Affected

To determine whether your application is affected by GHSA-4vr3-9v7h-5f8v, inspect your project dependencies for Gw2Sharp:

inspect dependencies for Gw2Sharp

Analyze the terminal output to locate any version of Gw2Sharp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.1), 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 General Security Weakness. In Gw2Sharp, 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

## Leaking cached authenticated requests ### Impact If you've been using one `MemoryCacheMethod` object in multiple instances of `Gw2WebApiClient` and are requesting authenticated endpoints with different access tokens, then you are likely to run into this bug. When using an instance of `MemoryCacheMethod` and using it with multiple instances of `Gw2WebApiClient`, there's a possibility that cached authenticated responses are leaking to another request to the same endpoint, but with a different Guild Wars 2 access token. The latter request wouldn't start however, and would return the first cached response immediately. This means that the second response (or later responses) may contain the same data as the first response, therefore leaking data from another authenticated endpoint. The occurence of this is limited however. The Guild Wars 2 API doesn't use the `Expires` header on most (if not all) authenticated endpoints. This header is checked when caching responses. If this header isn't available, the response isn't cached at all. You should still update to at least version 0.3.1 in order to be certain that it won't happen. ### Patches This bug has been fixed in version 0.3.1. When using an authenticated endpoint, it will prepend the SHA-1 hash of the access token to the cache id. ### Workarounds For version 0.3.0 and lower, you can use one separate instance of `MemoryCacheMethod` per `Gw2WebApiClient` if you need to use it. ### For more information If you have any questions or comments about this advisory, you can open an issue in [the Gw2Sharp repository](https://github.com/Archomeda/Gw2Sharp) or contact me on [Discord](https://discord.gg/hNcpDT3).

GHSA-4vr3-9v7h-5f8v Affected Gw2Sharp Versions

1 component(s)
Fixed Versions:
0.3.1
Product / Package Ecosystem Affected Versions Fixed Version
Gw2Sharp
NuGet
< 0.3.1
0.3.1

References

Frequently Asked Questions

What is GHSA-4vr3-9v7h-5f8v?
GHSA-4vr3-9v7h-5f8v is a security vulnerability in Gw2Sharp involving Low severity vulnerability that affects Gw2Sharp under General Security Weakness.
Which Gw2Sharp versions are affected?
Affected versions include releases prior to 0.3.1 across affected packages: Gw2Sharp.
What version fixes GHSA-4vr3-9v7h-5f8v?
Upgrading to 0.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Gw2Sharp affected?
Yes, Gw2Sharp is affected in releases prior to 0.3.1. Upgrade your dependency to 0.3.1 or later.
What CWE is associated with GHSA-4vr3-9v7h-5f8v?
GHSA-4vr3-9v7h-5f8v is classified under General Security Weakness.
How can I check NuGet dependencies for GHSA-4vr3-9v7h-5f8v?
Run the dependency tree command: 'inspect dependencies for Gw2Sharp'. 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-4vr3-9v7h-5f8v",
  "modified" : "2021-12-03T14:36:23Z",
  "published" : "2019-06-18T15:38:41Z",
  "aliases" : [ ],
  "summary" : "Low severity vulnerability that affects Gw2Sharp",
  "details" : "## Leaking cached authenticated requests\n\n### Impact\nIf you've been using one `MemoryCacheMethod` object in multiple instances of `Gw2WebApiClient` and are requesting authenticated endpoints with different access tokens, then you are likely to run into this bug.\n\nWhen using an instance of `MemoryCacheMethod` and using it with multiple instances of `Gw2WebApiClient`, there's a possibility that cached authenticated responses are leaking to another request to the same endpoint, but with a different Guild Wars 2 access token. The latter request wouldn't start however, and would return the first cached response immediately. This means that the second response (or later responses) may contain the same data as the first response, therefore leaking data from another authenticated endpoint.\n\nThe occurence of this is limited however. The Guild Wars 2 API doesn't use the `Expires` header on most (if not all) authenticated endpoints. This header is checked when caching responses. If this header isn't available, the response isn't cached at all. You should still update to at least version 0.3.1 in order to be certain that it won't happen.\n\n### Patches\nThis bug has been fixed in version 0.3.1. When using an authenticated endpoint, it will prepend the SHA-1 hash of the access token to the cache id.\n\n### Workarounds\nFor version 0.3.0 and lower, you can use one separate instance of `MemoryCacheMethod` per `Gw2WebApiClient` if you need to use it.\n\n### For more information\nIf you have any questions or comments about this advisory, you can open an issue in [the Gw2Sharp repository](https://github.com/Archomeda/Gw2Sharp) or contact me on [Discord](https://discord.gg/hNcpDT3).\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Gw2Sharp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Archomeda/Gw2Sharp/security/advisories/GHSA-4vr3-9v7h-5f8v"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Archomeda/Gw2Sharp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-4vr3-9v7h-5f8v"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:59:21Z",
    "nvd_published_at" : null
  }
}