Gal-Doron / IaC_check

0 stars 0 forks source link

github.com/gofiber/fiber/v2-v2.1.4: 5 vulnerabilities (highest severity is: 9.4) #319

Open mend-for-github-com[bot] opened 1 year ago

mend-for-github-com[bot] commented 1 year ago
Vulnerable Library - github.com/gofiber/fiber/v2-v2.1.4

⚡️ Express inspired web framework written in Go

Library home page: https://proxy.golang.org/github.com/gofiber/fiber/v2/@v/v2.1.4.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (github.com/gofiber/fiber/v2-v2.1.4 version) Remediation Possible**
CVE-2024-25124 Critical 9.4 github.com/gofiber/fiber/v2-v2.1.4 Direct v2.52.1
CVE-2023-45141 High 8.8 github.com/gofiber/fiber/v2-v2.1.4 Direct v2.50.0
CVE-2023-45128 High 8.8 github.com/gofiber/fiber/v2-v2.1.4 Direct v2.50.0
CVE-2022-21221 High 7.5 github.com/valyala/FastHTTP-v1.17.0 Transitive N/A*
CVE-2023-41338 Medium 5.3 github.com/gofiber/fiber/v2-v2.1.4 Direct v2.49.2

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2024-25124 ### Vulnerable Library - github.com/gofiber/fiber/v2-v2.1.4

⚡️ Express inspired web framework written in Go

Library home page: https://proxy.golang.org/github.com/gofiber/fiber/v2/@v/v2.1.4.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Dependency Hierarchy: - :x: **github.com/gofiber/fiber/v2-v2.1.4** (Vulnerable Library)

Found in base branch: main

### Vulnerability Details

Fiber is a web framework written in go. Prior to version 2.52.1, the CORS middleware allows for insecure configurations that could potentially expose the application to multiple CORS-related vulnerabilities. Specifically, it allows setting the Access-Control-Allow-Origin header to a wildcard (`*`) while also having the Access-Control-Allow-Credentials set to true, which goes against recommended security best practices. The impact of this misconfiguration is high as it can lead to unauthorized access to sensitive user data and expose the system to various types of attacks listed in the PortSwigger article linked in the references. Version 2.52.1 contains a patch for this issue. As a workaround, users may manually validate the CORS configurations in their implementation to ensure that they do not allow a wildcard origin when credentials are enabled. The browser fetch api, as well as browsers and utilities that enforce CORS policies, are not affected by this.

Publish Date: 2024-02-21

URL: CVE-2024-25124

### CVSS 3 Score Details (9.4)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: Low

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://github.com/gofiber/fiber/security/advisories/GHSA-fmg4-x8pw-hjhg

Release Date: 2024-02-21

Fix Resolution: v2.52.1

:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.
CVE-2023-45141 ### Vulnerable Library - github.com/gofiber/fiber/v2-v2.1.4

⚡️ Express inspired web framework written in Go

Library home page: https://proxy.golang.org/github.com/gofiber/fiber/v2/@v/v2.1.4.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Dependency Hierarchy: - :x: **github.com/gofiber/fiber/v2-v2.1.4** (Vulnerable Library)

Found in base branch: main

### Vulnerability Details

Fiber is an express inspired web framework written in Go. A Cross-Site Request Forgery (CSRF) vulnerability has been identified in the application, which allows an attacker to obtain tokens and forge malicious requests on behalf of a user. This can lead to unauthorized actions being taken on the user's behalf, potentially compromising the security and integrity of the application. The vulnerability is caused by improper validation and enforcement of CSRF tokens within the application. This vulnerability has been addressed in version 2.50.0 and users are advised to upgrade. Users should take additional security measures like captchas or Two-Factor Authentication (2FA) and set Session cookies with SameSite=Lax or SameSite=Secure, and the Secure and HttpOnly attributes.

Publish Date: 2023-10-16

URL: CVE-2023-45141

### CVSS 3 Score Details (8.8)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: Required - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://github.com/gofiber/fiber/security/advisories/GHSA-mv73-f69x-444p

Release Date: 2023-10-16

Fix Resolution: v2.50.0

:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.
CVE-2023-45128 ### Vulnerable Library - github.com/gofiber/fiber/v2-v2.1.4

⚡️ Express inspired web framework written in Go

Library home page: https://proxy.golang.org/github.com/gofiber/fiber/v2/@v/v2.1.4.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Dependency Hierarchy: - :x: **github.com/gofiber/fiber/v2-v2.1.4** (Vulnerable Library)

Found in base branch: main

### Vulnerability Details

Fiber is an express inspired web framework written in Go. A Cross-Site Request Forgery (CSRF) vulnerability has been identified in the application, which allows an attacker to inject arbitrary values and forge malicious requests on behalf of a user. This vulnerability can allow an attacker to inject arbitrary values without any authentication, or perform various malicious actions on behalf of an authenticated user, potentially compromising the security and integrity of the application. The vulnerability is caused by improper validation and enforcement of CSRF tokens within the application. This issue has been addressed in version 2.50.0 and users are advised to upgrade. Users should take additional security measures like captchas or Two-Factor Authentication (2FA) and set Session cookies with SameSite=Lax or SameSite=Secure, and the Secure and HttpOnly attributes as defense in depth measures. There are no known workarounds for this vulnerability.

Publish Date: 2023-10-16

URL: CVE-2023-45128

### CVSS 3 Score Details (8.8)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: Required - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-45128

Release Date: 2023-10-16

Fix Resolution: v2.50.0

:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.
CVE-2022-21221 ### Vulnerable Library - github.com/valyala/FastHTTP-v1.17.0

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Library home page: https://proxy.golang.org/github.com/valyala/fasthttp/@v/v1.17.0.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Dependency Hierarchy: - github.com/gofiber/fiber/v2-v2.1.4 (Root Library) - :x: **github.com/valyala/FastHTTP-v1.17.0** (Vulnerable Library)

Found in base branch: main

### Vulnerability Details

The package github.com/valyala/fasthttp before 1.34.0 are vulnerable to Directory Traversal via the ServeFile function, due to improper sanitization. It is possible to be exploited by using a backslash %5c character in the path. **Note:** This security issue impacts Windows users only.

Publish Date: 2022-03-17

URL: CVE-2022-21221

### CVSS 3 Score Details (7.5)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: None - Availability Impact: None

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21221

Release Date: 2022-03-17

Fix Resolution: v1.34.0

CVE-2023-41338 ### Vulnerable Library - github.com/gofiber/fiber/v2-v2.1.4

⚡️ Express inspired web framework written in Go

Library home page: https://proxy.golang.org/github.com/gofiber/fiber/v2/@v/v2.1.4.zip

Path to dependency file: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Path to vulnerable library: /kubernetes-goat-1.1.0/infrastructure/health-check/go.mod

Dependency Hierarchy: - :x: **github.com/gofiber/fiber/v2-v2.1.4** (Vulnerable Library)

Found in base branch: main

### Vulnerability Details

Fiber is an Express inspired web framework built in the go language. Versions of gofiber prior to 2.49.2 did not properly restrict access to localhost. This issue impacts users of our project who rely on the `ctx.IsFromLocal` method to restrict access to localhost requests. If exploited, it could allow unauthorized access to resources intended only for localhost. Setting `X-Forwarded-For: 127.0.0.1` in a request from a foreign host, will result in true for `ctx.IsFromLocal`. Access is limited to the scope of the affected process. This issue has been patched in version `2.49.2` with commit `b8c9ede6`. Users are advised to upgrade. There are no known workarounds to remediate this vulnerability without upgrading to the patched version.

Publish Date: 2023-09-08

URL: CVE-2023-41338

### CVSS 3 Score Details (5.3)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: Low - Integrity Impact: None - Availability Impact: None

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-41338

Release Date: 2023-09-08

Fix Resolution: v2.49.2

:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.

:rescue_worker_helmet:Automatic Remediation will be attempted for this issue.