# CVE-2023-30618: Sensitive Terraform Output Values Printed At Info Logging Level In Kitchen-Terraform

> Sensitive Terraform output values are logged at info level, allowing local attackers to read secrets from terminal logs.

- **Severity:** Low 3.2 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 21 Apr 2023
- **Updated:** 4 Feb 2025
- **Also known as:** GHSA-65g2-x53q-cmf6

## What is CVE-2023-30618?

CVE-2023-30618 is a low-severity vulnerability in newcontext-oss kitchen-terraform, published on 21 Apr 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Kitchen-Terraform provides a set of Test Kitchen plugins which enable the use of Test Kitchen to converge a Terraform configuration and verify the resulting infrastructure systems with InSpec controls. Kitchen-Terraform v7.0.0 introduced a regression which caused all Terraform output values, including sensitive values, to be printed at the `info` logging level during the `kitchen converge` action. Prior to v7.0.0, the output values were printed at the `debug` level to avoid writing sensitive values to the terminal by default. An attacker would need access to the local machine in order to gain access to these logs during an operation. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File)

## Which versions are affected by CVE-2023-30618?

2 open source packages ship an affected version, including kitchen-terraform. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kitchen-terraform` | RubyGems | From 7.0.0 | 7.0.1 |
| `kitchen-terraform` | RubyGems | From 7.0.0 | 7.0.1 |

Products: Kitchen-Terraform Project Kitchen-Terraform.

## How do I fix CVE-2023-30618?

Upgrade kitchen-terraform to 7.0.1 or later.

## Is CVE-2023-30618 being exploited?

There is no known exploitation of CVE-2023-30618 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-30618 and fix it if it is affected.

What it is: CVE-2023-30618 is a low-severity vulnerability in newcontext-oss kitchen-terraform, published on 21 Apr 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-30618 in the wild and no public exploit code.

Affected packages and fixed versions:
- kitchen-terraform (RubyGems): affected from 7.0.0; fixed in 7.0.1
- kitchen-terraform (RubyGems): affected from 7.0.0; fixed in 7.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-30618/ (Markdown: https://insights.sbomify.com/CVE-2023-30618/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-30618
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-30618
- OSV: https://osv.dev/vulnerability/CVE-2023-30618

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-30618/
Summaries are generated and may contain mistakes; the official description above is the record.
