Container Security state does not pass in Gitlab pipeline because of one high level vulnerability. This vulnerability is jwt-go and it's installed version is v3.2.0+incompatible. The error title like this: jwt-go: access restriction bypass vulnerability-->avd.aquasec.com/nvd/cve-2020-26160. The Go version of the relevant repo is 1.16.3. How can I fix this vulnerability?
How to bypass cve-2020-26160 vulnerability in dgrijalva/jwt-go?
1.2k Views Asked by desdemona At
2
The CVE-2020-26160 vulnerability is due to the fact that
dgrijalva/jwt-goincorrectly models the JWTaudfield as astring, when based on the JWT specs it should be a slice of strings.You can't bypass it yourself, because it's a bug in the library: https://github.com/dgrijalva/jwt-go/issues/428
Switch to the official community fork
golang-jwt/jwt, itsv3.2.1fixes the vulnerability: https://github.com/golang-jwt/jwt/releases/tag/v3.2.1