Skip to content

Commit

Permalink
Update 20230823.md
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchennn committed Aug 21, 2023
1 parent 8e43f59 commit a1d117e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/blog/CSRF/20230823.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Web security: CSRF vulnerability in webconsole

>[!NOTE]
> Author: Brian Chen (陳煜盛)
> Date: 2023/8/23
## Abstract
This article is intended for individuals who possess an interest in free5gc/webconsole and hold concerns regarding security matters. It aims to provide a concise introduction to the webconsole, followed by an exposition of a significant security concern along with our corresponding solution. Within webconsole v1.2.0, aligning with the most recent iteration of free5gc v3.3.0, certain vulnerabilities have been identified that could potentially lead to the exposure of subscriber data. It is my responsibility to address and rectify these vulnerabilities, enhancing the webconsole's resilience against cyber attacks.
Expand Down Expand Up @@ -212,10 +215,10 @@ func CheckAuth(c *gin.Context) bool {
}
```

:::
- The secret key utilized for signature verification is obtained through `os.Getenv("SIGNINGKEY")`. However, there's a possibility that `SIGNINGKEY` might not be exported as an environment variable, leading to a potential return of an empty value. Under such circumstances, an implication arises: an admin in Webconsole A could potentially gain access to subscriber data within Webconsole B.
- Within the `CheckAuth()` function, if the client sets the JWT token to **'admin'**, the function will evaluate to true, effectively allowing the check to be passed.
:::
> [!WARNING]
> The secret key utilized for signature verification is obtained through `os.Getenv("SIGNINGKEY")`. However, there's a possibility that `SIGNINGKEY` might not be exported as an environment variable, leading to a potential return of an empty value. Under such circumstances, an implication arises: an admin in Webconsole A could potentially gain access to subscriber data within Webconsole B.
> Within the `CheckAuth()` function, if the client sets the JWT token to **'admin'**, the function will evaluate to true, effectively allowing the check to be passed.

## Implementation

Expand Down

0 comments on commit a1d117e

Please sign in to comment.