GHSA-8459-6rc9-8vf8: Github.com/cloudflare/cfrpki Path Traversal Vulnerability

LOW
CWE-22
Published
Advisory Summary

GHSA-8459-6rc9-8vf8 is a LOW path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/cloudflare/cfrpki libraries in the Go ecosystem. The issue involves path traversal in github.com/cloudflare/cfrpki/cmd/octorpki. Remediation is available by upgrading affected packages to version 1.4.3.

GHSA-8459-6rc9-8vf8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8459-6rc9-8vf8
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/cloudflare/cfrpki
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-8459-6rc9-8vf8

To remediate this vulnerability, upgrade all affected Github.com/cloudflare/cfrpki 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/cloudflare/cfrpki fixed: 1.4.3
Upgrade github.com/cloudflare/cfrpki to 1.4.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/cloudflare/cfrpki

How to Check if You Are Affected

To determine whether your application is affected by GHSA-8459-6rc9-8vf8, inspect your project dependencies for Github.com/cloudflare/cfrpki:

inspect dependencies for github.com/cloudflare/cfrpki

Analyze the terminal output to locate any version of Github.com/cloudflare/cfrpki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/cloudflare/cfrpki, 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 In the case that a malicious TAL file is parsed pointing to a repository that provides a malicious ROA file which octorpki downloads, it is possible to bypass the current directory traversal mitigation to allow writing outside of the current directory. ### Patches No patch release has been made

GHSA-8459-6rc9-8vf8 Affected Github.com/cloudflare/cfrpki Versions

1 component(s)
Fixed Versions:
1.4.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudflare/cfrpki
Go
< 1.4.3
1.4.3

References

Frequently Asked Questions

What is GHSA-8459-6rc9-8vf8?
GHSA-8459-6rc9-8vf8 is a security vulnerability in Github.com/cloudflare/cfrpki involving Path traversal in github.com/cloudflare/cfrpki/cmd/octorpki under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/cloudflare/cfrpki versions are affected?
Affected versions include releases prior to 1.4.3 across affected packages: github.com/cloudflare/cfrpki.
What version fixes GHSA-8459-6rc9-8vf8?
Upgrading to 1.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudflare/cfrpki affected?
Yes, github.com/cloudflare/cfrpki is affected in releases prior to 1.4.3. Upgrade your dependency to 1.4.3 or later.
What CWE is associated with GHSA-8459-6rc9-8vf8?
GHSA-8459-6rc9-8vf8 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for GHSA-8459-6rc9-8vf8?
Run the dependency tree command: 'inspect dependencies for github.com/cloudflare/cfrpki'. 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-8459-6rc9-8vf8",
  "modified" : "2023-11-07T14:29:10Z",
  "published" : "2022-02-14T22:52:15Z",
  "aliases" : [ ],
  "summary" : "Path traversal in github.com/cloudflare/cfrpki/cmd/octorpki",
  "details" : "### Impact\n\nIn the case that a malicious TAL file is parsed pointing to a repository that provides a malicious ROA file which octorpki downloads, it is possible to bypass the current directory traversal mitigation to allow writing outside of the current directory. \n\n### Patches\n\nNo patch release has been made",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudflare/cfrpki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.4.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/cfrpki/security/advisories/GHSA-8459-6rc9-8vf8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/cfrpki/commit/a053a808feeb3115c76b6cc263ee55598ce6e8cd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/cfrpki/commit/eb9cc4db7b7b79e44f56dfaa959fccdfb2af8284"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/cfrpki"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/cfrpki/releases/tag/v1.4.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-14T22:52:15Z",
    "nvd_published_at" : null
  }
}