# GHSA-j34v-3552-5r7j: Multiple security issues in Pomerium's embedded envoy

> Attackers can cause denial of service or bypass security controls in Pomerium due to vulnerabilities in its embedded Envoy proxy.

- **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:** 1 Mar 2022

## What is GHSA-j34v-3552-5r7j?

GHSA-j34v-3552-5r7j is a memory corruption vulnerability in github.com/pomerium/pomerium, published on 1 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Envoy, which Pomerium is based on, has issued multiple CVEs impacting stability and security.

Though Pomerium may not be vulnerable to all of the issues, it is recommended that all users upgrade to Pomerium v0.16.4 as soon as possible to minimize risk.

### Impact

- Possible DoS or crash
- Resources available to unauthorized users
- Pomerium may trust upstream certificates that should not be trusted

### Patches
Patched in v0.16.4

### Workarounds
No

### References

[Envoy Security Announcement](https://groups.google.com/g/envoy-security-announce/c/QBGxoqZdTR4)

* [CVE-2021-43824](https://github.com/envoyproxy/envoy/security/advisories/GHSA-vj5m-rch8-5r2p) (CVSS Score 6.5, Medium): Envoy 1.21.0 and earlier - Potential null pointer dereference when using JWT filter safe_regex match
* [CVE-2021-43825](https://github.com/envoyproxy/envoy/security/advisories/GHSA-h69p-g6xg-mhhh) (CVSS Score 6.1, Medium): Envoy 1.21.0 and earlier - Use-after-free when response filters increase response data, and increased data exceeds downstream buffer limits.
* [CVE-2021-43826](https://github.com/envoyproxy/envoy/security/advisories/GHSA-cmx3-fvgf-83mf) (CVSS Score 6.1, Medium): Envoy 1.21.0 and earlier - Use-after-free when tunneling TCP over HTTP, if downstream disconnects during upstream connection establishment
* [CVE-2022-21654](https://github.com/envoyproxy/envoy/security/advisories/GHSA-5j4x-g36v-m283) (CVSS Score 7.3, High): Envoy 1.7.0 and later - Incorrect configuration handling allows mTLS session re-use without re-validation after validation settings have changed.
* [CVE-2022-21655](https://github.com/envoyproxy/envoy/security/advisories/GHSA-7r5p-7fmh-jxpg) (CVSS Score 7.5, High): Envoy 1.21 and earlier - Incorrect handling of internal redirects to routes with a direct response entry
* [CVE-2022-21657](https://github.com/envoyproxy/envoy/security/advisories/GHSA-837m-wjrv-vm5g) (CVSS Score 3.1, Low): Envoy 1.20.1 and earlier - X.509 Extended Key Usage and Trust Purposes bypass

### For more information
If you have any questions or comments about this advisory:

Open an issue in [pomerium/pomerium](https://github.com/pomerium/pomerium/issues)
Email us at [security@pomerium.com](mailto:security@pomerium.com)

## Which versions are affected by GHSA-j34v-3552-5r7j?

2 open source packages ship an affected version, including github.com/pomerium/pomerium.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/pomerium/pomerium` | Go | All versions | 0.16.4 |
| `github.com/pomerium/pomerium` | Go | All versions | 0.16.4 |

## How do I fix GHSA-j34v-3552-5r7j?

Upgrade github.com/pomerium/pomerium to 0.16.4 or later.

## Is GHSA-j34v-3552-5r7j being exploited?

There is no known exploitation of GHSA-j34v-3552-5r7j in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j34v-3552-5r7j and fix it if it is affected.

What it is: GHSA-j34v-3552-5r7j is a memory corruption vulnerability in github.com/pomerium/pomerium, published on 1 Mar 2022. 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-j34v-3552-5r7j in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/pomerium/pomerium (Go): affected all versions; fixed in 0.16.4
- github.com/pomerium/pomerium (Go): affected all versions; fixed in 0.16.4

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-j34v-3552-5r7j/ (Markdown: https://insights.sbomify.com/GHSA-j34v-3552-5r7j/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j34v-3552-5r7j

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j34v-3552-5r7j/
Summaries are generated and may contain mistakes; the official description above is the record.
