Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfiles use outdated terraform (and tf providers) with critical vulnerabilities #6184

Closed
jeremypetit-grtgaz opened this issue Feb 21, 2023 · 2 comments · Fixed by #6197
Closed
Labels
bug Something isn't working community Community contribution

Comments

@jeremypetit-grtgaz
Copy link
Contributor

Kics docker images raise security issues (using trivy).

Expected Behavior

Critical (and maybe high) severity vulnerabilities should be fixed.
Bumping terraform and its providers to last stable releases should fix that (similar to what was done to ./Dockerfile in #5492 ).

Actual Behavior

Latest kics docker images raise critical security issues on terraform binary and on terraform-azure provider binary.

checkmarx/kics:ubi8 (redhat 8.7)
================================
Total: 0 (CRITICAL: 0)


root/.terraform.d/plugins/linux_amd64/terraform-provider-azurerm_v2.95.0_x5 (gobinary)
======================================================================================
Total: 1 (CRITICAL: 1)

┌────────────────────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬────────────────────────────────────────────┐
│            Library             │ Vulnerability  │ Severity │ Installed Version │ Fixed Version │                   Title                    │
├────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────┤
│ github.com/hashicorp/go-getter │ CVE-2022-26945 │ CRITICAL │ v1.5.4            │ 1.6.1         │ go-getter: command injection vulnerability │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-26945 │
└────────────────────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴────────────────────────────────────────────┘

usr/bin/terraform (gobinary)
============================
Total: 2 (CRITICAL: 2)

┌────────────────────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│            Library             │ Vulnerability  │ Severity │ Installed Version │ Fixed Version │                            Title                             │
├────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/Masterminds/goutils │ CVE-2021-4238  │ CRITICAL │ v1.1.0            │ v1.1.1        │ goutils: RandomAlphaNumeric and CryptoRandomAlphaNumeric are │
│                                │                │          │                   │               │ not as random as they should be...                           │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2021-4238                    │
├────────────────────────────────┼────────────────┤          ├───────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/hashicorp/go-getter │ CVE-2022-26945 │          │ v1.5.9            │ 1.6.1         │ go-getter: command injection vulnerability                   │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-26945                   │
└────────────────────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘

Steps to Reproduce the Problem

# print critical severity CVEs
docker run aquasec/trivy image --severity CRITICAL checkmarx/kics:v1.6.10-ubi8
...

# print high severity CVEs
docker run aquasec/trivy image --severity HIGH checkmarx/kics:v1.6.10-ubi8
...
@jeremypetit-grtgaz jeremypetit-grtgaz added bug Something isn't working community Community contribution labels Feb 21, 2023
@kaplanlior
Copy link
Member

hashicorp/terraform#32606 says goutils doesn't affect terraform. We'll upgrade in any case for the latest stable which has this fix (1.3.9).

@gabriel-cx
Copy link
Collaborator

Hi @jeremypetit-grtgaz,

Thank you for your feedback on this!
We merged now a fix for this situation. And today we will release a new KICS version that will contain this fix as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants