Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

GHSA-q4pp-j36h-3gqg basti-cdk

Fix: BohdanPetryshyn/basti@f6f218e

GHSA-q4pp-j36h-3gqg is a security vulnerability in basti-cdk. A fix is available for basti-cdk — see the affected versions and patch details below.

Minimal `basti` IAM Policy Allows Shell Access

Published
Aug 24, 2023
Updated
Aug 24, 2023
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 24, 2023 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

0other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
basti-cdknpm
173downloads / week

Description

Summary

The provided Minimal IAM Policy for bastic connect does not include ssm:SessionDocumentAccessCheck. This results in the ability to get a shell session on the bastion, not just the intended access for Port Forwarding.

Details

basti connect is designed to "securely connect to your RDS/Aurora/Elasticache/EC2 instances", using a bastion instance "with AWS Session Manager port forwarding capability to make the target available on your localhost."

The Minimal IAM Policy allows port forwarding via the following statement:

 {
      "Effect": "Allow",
      "Action": "ssm:StartSession",
      "Resource": [
        "arn:aws:ssm:*:*:document/AWS-StartPortForwardingSessionToRemoteHost",
        "arn:aws:ec2:<your-region>:<your-account-id>:instance/<your-basti-instance-id>"
      ]
    }

This statement does not include the following condition:

"Condition": {
    "BoolIfExists": {
        "ssm:SessionDocumentAccessCheck": "true"
    }
}

As a result, the basti connect minimal policy is logically identical to:

 {
      "Effect": "Allow",
      "Action": "ssm:StartSession",
      "Resource": [
        "arn:aws:ssm:*:*:document/AWS-StartPortForwardingSessionToRemoteHost",
        "arn:aws:ssm:*:*:document/SSM-SessionManagerRunShell",
        "arn:aws:ec2:<your-region>:<your-account-id>:instance/<your-basti-instance-id>"
      ]
    }

A basti admin would expect users under the minimal policy to be able to port forward. However, they could also get a shell on the bastion.

For more details on this footgun, see: https://ramimac.me/ssm-iam

PoC

Complete instructions, including specific configuration details, to reproduce the vulnerability.

Impact

Impact would depend on configuration/hardening of the bastion. I've seen examples where bastions have credentials to downstream systems in configuration or memory that would be exposed.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmbasti-cdkall versions1.0.1npm install basti-cdk@1.0.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for basti-cdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update basti-cdk to 1.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-q4pp-j36h-3gqg is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-q4pp-j36h-3gqg can be triaged on real exposure rather than presence alone.

Tailored to GHSA-q4pp-j36h-3gqg. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary The provided Minimal IAM Policy for `bastic connect` does not include `ssm:SessionDocumentAccessCheck`. This results in the ability to get a shell session on the bastion, not just the intended access for Port Forwarding. ### Details `basti connect` is designed to "securely connect to your RDS/Aurora/Elasticache/EC2 instances", using a bastion instance "with [AWS Session Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html) port forwarding capability to make the target available on your localhost." The [Minimal IAM Policy](https://github.com
O3 Security · Impact-Aware SCA

Is GHSA-q4pp-j36h-3gqg in your dependencies?

O3 Security finds GHSA-q4pp-j36h-3gqg across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-q4pp-j36h-3gqg: basti-cdk | O3 Security