Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) make vulnerability node_id more unique #2045

Merged
merged 2 commits into from
Mar 29, 2024
Merged

Conversation

ibreakthecloud
Copy link
Contributor

@ibreakthecloud ibreakthecloud commented Mar 28, 2024

package (p1),version(v1), package_path (pp1) : vuln(cve1)
package (p1), version(v1), package_path (pp2): vuln(cve1)

In this case we were dropping vulnerabilities.

Example:

Two vulnerability with same cve, same package, same version, but different package_path

{
    "data": {
      "cve_caused_by_package": "github.com/docker/distribution:v2.8.1+incompatible",
      "cve_caused_by_package_path": "/home/deepfence/bin/package-scanner",
      "cve_container_layer": "",
      "cve_id": "CVE-2023-2253",
      "cve_link": "https://www.openwall.com/lists/oss-security/2023/05/09/1",
      "cve_severity": "medium",
      "exploitability_score": 2,
      "has_live_connection": false,
      "init_exploitability_score": 2
    },
    "node_id": "github.com/docker/distribution:v2.8.1+incompatibleCVE-2023-2253",
    "rule": {
      "cve_attack_vector": "cvss:3.1/av:n/ac:l/pr:l/ui:n/s:u/c:n/i:n/a:h",
      "cve_cvss_score": 6.5,
      "cve_description": "A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution, which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n,` causing the allocation of a massive string array, possibly causing a denial of service through excessive use of memory.",
      "cve_fixed_in": "2.8.2-beta.1",
      "cve_id": "CVE-2023-2253",
      "cve_link": "https://www.openwall.com/lists/oss-security/2023/05/09/1",
      "cve_overall_score": 6.5,
      "cve_severity": "medium",
      "cve_type": "golang",
      "exploit_poc": "",
      "parsed_attack_vector": "network",
      "urls": [
        "https://access.redhat.com/security/cve/CVE-2023-2253",
      ]
    },
    "scan_id": ""
  },
{
    "data": {
      "cve_caused_by_package": "github.com/docker/distribution:v2.8.1+incompatible",
      "cve_caused_by_package_path": "/usr/local/bin/vessel",
      "cve_container_layer": "",
      "cve_id": "CVE-2023-2253",
      "cve_link": "https://www.openwall.com/lists/oss-security/2023/05/09/1",
      "cve_severity": "medium",
      "exploitability_score": 2,
      "has_live_connection": false,
      "init_exploitability_score": 2
    },
    "node_id": "github.com/docker/distribution:v2.8.1+incompatibleCVE-2023-2253",
    "rule": {
      "cve_attack_vector": "cvss:3.1/av:n/ac:l/pr:l/ui:n/s:u/c:n/i:n/a:h",
      "cve_cvss_score": 6.5,
      "cve_description": "A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution, which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n,` causing the allocation of a massive string array, possibly causing a denial of service through excessive use of memory.",
      "cve_fixed_in": "2.8.2-beta.1",
      "cve_id": "CVE-2023-2253",
      "cve_link": "https://www.openwall.com/lists/oss-security/2023/05/09/1",
      "cve_overall_score": 6.5,
      "cve_severity": "medium",
      "cve_type": "golang",
      "exploit_poc": "",
      "parsed_attack_vector": "network",
      "urls": [
        "https://access.redhat.com/security/cve/CVE-2023-2253",
      ]
    },
    "scan_id": ""
  },

Using ID with cve_id + package_name + package_version, might led to dropping of CVEs which we have observed recently.

@ibreakthecloud ibreakthecloud force-pushed the fix-cve-drop branch 2 times, most recently from 7bbf9ba to b9ce2c2 Compare March 28, 2024 18:02
@ibreakthecloud ibreakthecloud changed the title make vulnerability node_id more unique (fix) make vulnerability node_id more unique Mar 28, 2024
@ibreakthecloud ibreakthecloud merged commit 8f7bea4 into main Mar 29, 2024
3 of 4 checks passed
@ibreakthecloud ibreakthecloud deleted the fix-cve-drop branch March 29, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants