# GHSA-rjfv-pjvx-mjgv: AWS Load Balancer Controller automatically detaches externally associated web ACL from Application Load Balancers

> The AWS Load Balancer Controller may automatically detach externally associated WAF WebACLs from Application Load Balancers, leaving them unprotected.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Oct 2024
- **Also known as:** GO-2024-3212

## What is GHSA-rjfv-pjvx-mjgv?

GHSA-rjfv-pjvx-mjgv is a vulnerability in sigs.k8s.io/aws-load-balancer-controller, published on 24 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary 

The AWS Load Balancer Controller includes an optional, default-enabled feature that manages WAF WebACLs on Application Load Balancers (ALBs) on your behalf. In versions 2.8.1 and earlier, if the WebACL annotation [1] [alb.ingress.kubernetes.io/wafv2-acl-arn](http://alb.ingress.kubernetes.io/wafv2-acl-arn) or [alb.ingress.kubernetes.io/waf-acl-id](http://alb.ingress.kubernetes.io/waf-acl-id) was absent on Ingresses, the controller would automatically disassociate any existing WebACL from the ALBs, including those associated by AWS Firewall Manager (FMS). Customers on impacted versions should upgrade to prevent this issue from occurring. 

### Impact 

WebACLs attached to ALBs managed by the AWS Load Balancer Controller through methods other than Ingress annotations may be automatically removed, leaving the ALBs unprotected by WebACL. 

Impacted versions: [>=2.0.0;<2.8.2] 

### Patches 

We addressed this issue in version 2.8.2 [2] and recommend customers upgrade. Now, if the WebACL annotation is absent on Ingress objects, any existing WebACL on the ALB will remain intact instead of being removed. 

### Workarounds 

If the previous behavior affected you, you can mitigate it by disabling the WebACL management feature using the --enable-waf and --enable-wafv2 command-line flags [3] 

### References 

If you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [4] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. 

[1] https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/ingress/annotations/#addons 

[2] https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/tag/v2.8.2 

[3] https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/deploy/configurations/#waf-addons 

[4] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting

## Which versions are affected by GHSA-rjfv-pjvx-mjgv?

3 open source packages ship an affected version, including sigs.k8s.io/aws-load-balancer-controller.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sigs.k8s.io/aws-load-balancer-controller` | Go | All versions | None |
| `sigs.k8s.io/aws-load-balancer-controller` | Go | From 2.0.0 | 2.8.2 |
| `sigs.k8s.io/aws-load-balancer-controller` | Go | From 2.0.0 | 2.8.2 |

## How do I fix GHSA-rjfv-pjvx-mjgv?

Upgrade sigs.k8s.io/aws-load-balancer-controller to 2.8.2 or later.

## Is GHSA-rjfv-pjvx-mjgv being exploited?

There is no known exploitation of GHSA-rjfv-pjvx-mjgv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-rjfv-pjvx-mjgv and fix it if it is affected.

What it is: GHSA-rjfv-pjvx-mjgv is a vulnerability in sigs.k8s.io/aws-load-balancer-controller, published on 24 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-rjfv-pjvx-mjgv in the wild and no public exploit code.

Affected packages and fixed versions:
- sigs.k8s.io/aws-load-balancer-controller (Go): affected all versions; no fix listed
- sigs.k8s.io/aws-load-balancer-controller (Go): affected from 2.0.0; fixed in 2.8.2
- sigs.k8s.io/aws-load-balancer-controller (Go): affected from 2.0.0; fixed in 2.8.2

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/GHSA-rjfv-pjvx-mjgv/ (Markdown: https://insights.sbomify.com/GHSA-rjfv-pjvx-mjgv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-rjfv-pjvx-mjgv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-rjfv-pjvx-mjgv/
Summaries are generated and may contain mistakes; the official description above is the record.
