Skip to content

Commit 79524d6

Browse files
authored
Merge pull request #13 from p80n-sec/add-buffa-cve
Add CVE-2026-55407 (buffa) and GHSA-j77w-g4jj-hp99 (gh-aw)
2 parents a0478f8 + 3b013de commit 79524d6

4 files changed

Lines changed: 103 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ Browse the full inventory, including per-finding detail pages and talks:
1717
|| 2026-08-08 | NocoBase | 8.7 | ENDOR-VUL-2026-16044 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
1818
|| 2026-08-08 | Langflow || ENDOR-VUL-2026-2601 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
1919
|| 2026-08-08 | Langflow || ENDOR-VUL-2026-26012 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
20+
| [GHSA-j77w-g4jj-hp99](https://github.com/github/gh-aw/security/advisories/GHSA-j77w-g4jj-hp99) | 2026-08-07 | gh-aw | 9.6 | ENDOR-VUL-2026-0906 |
2021
| [GHSA-9fpm-3445-2vx4](https://github.com/langflow-ai/langflow/security/advisories/GHSA-9fpm-3445-2vx4) | 2026-08-04 | Langflow | 8.8 | ENDOR-VUL-2026-26011 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
2122
| [CVE-2026-73487](https://nvd.nist.gov/vuln/detail/CVE-2026-73487) | 2026-07-29 | Flowise | 9.3 | ENDOR-VUL-2026-1704 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
2223
| [CVE-2026-73081](https://nvd.nist.gov/vuln/detail/CVE-2026-73081) | 2026-07-17 | Activepieces | 8.7 | ENDOR-VUL-2026-30031 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
2324
| [CVE-2026-73083](https://nvd.nist.gov/vuln/detail/CVE-2026-73083) | 2026-07-17 | Activepieces | 7.6 | ENDOR-VUL-2026-3003 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
25+
| [CVE-2026-55407](https://nvd.nist.gov/vuln/detail/CVE-2026-55407) | 2026-07-01 | buffa | 6.3 | ENDOR-VUL-2026-2105 · [Writeup](https://www.endorlabs.com/learn/endor-labs-ai-sast-finds-zero-day-cve-2026-55407-buffa) |
2426
| [CVE-2026-41640](https://nvd.nist.gov/vuln/detail/CVE-2026-41640) | 2026-04-22 | NocoBase | 7.5 | ENDOR-VUL-2026-16043 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
2527
| [CVE-2026-41641](https://nvd.nist.gov/vuln/detail/CVE-2026-41641) | 2026-04-22 | NocoBase | 7.2 | ENDOR-VUL-2026-16042 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |
2628
| [CVE-2026-30898](https://nvd.nist.gov/vuln/detail/CVE-2026-30898) | 2026-04-17 | Apache Airflow | 8.8 | ENDOR-VUL-2026-0503 · [Writeup](https://www.endorlabs.com/learn/hacking-your-life-with-ai-can-get-you-hacked) · [DEF CON 34](https://www.p80n.com/#hacking-your-life-with-ai) |

findings/CVE-2026-55407/finding.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
status: published
3+
id: CVE-2026-55407
4+
title: Memory Exhaustion via Unbounded Allocation in decode_unknown_field
5+
project: buffa
6+
component: buffa/src/encoding.rs
7+
cwe: CWE-770
8+
cvss: 6.3
9+
endor_id: ENDOR-VUL-2026-2105
10+
reported: 2026-05-21
11+
disclosed: 2026-07-01
12+
refs:
13+
nvd: https://nvd.nist.gov/vuln/detail/CVE-2026-55407
14+
ghsa: https://github.com/anthropics/buffa/security/advisories/GHSA-f9qc-qg88-7pq5
15+
blog: https://www.endorlabs.com/learn/endor-labs-ai-sast-finds-zero-day-cve-2026-55407-buffa
16+
credits:
17+
- Peyton Kennedy (p80n)
18+
---
19+
20+
Description: `decode_unknown_field` in buffa, Anthropic's Rust protobuf library, allocates heap in proportion to attacker-controlled wire data. Protobuf forward compatibility routes every unknown wire type through this function, so any message decoded from untrusted input with `preserve_unknown_fields=true` (the default) reaches it. Affects buffa and connectrpc before 0.8.0.
21+
22+
The flagged sink is the `LengthDelimited` arm, where a length taken off the wire becomes the allocation size directly:
23+
24+
```rust
25+
WireType::LengthDelimited => {
26+
let len = decode_varint(buf)?;
27+
let len = usize::try_from(len).map_err(|_| DecodeError::MessageTooLarge)?;
28+
if buf.remaining() < len {
29+
return Err(DecodeError::UnexpectedEof);
30+
}
31+
let mut data = alloc::vec![0u8; len]; // attacker-sized allocation
32+
buf.copy_to_slice(&mut data);
33+
UnknownFieldData::LengthDelimited(data)
34+
}
35+
```
36+
37+
The `buf.remaining() < len` guard prevents an out-of-bounds read; it does not cap the allocation, it only forces the attacker to deliver `len` bytes. That holds the flat sink to roughly 2x the input, which the function's own docstring accepts and pushes onto callers as an input-size cap.
38+
39+
That guidance does not survive one branch down. The `StartGroup` arm bounds recursion *depth* through `checked_sub` but says nothing about field *count* within a single group, and every loop iteration pushes an `UnknownField` onto a `Vec`. On a 64-bit target an `UnknownField` is about 40 bytes, while the cheapest nested field an attacker can encode is a zero varint at exactly 2 wire bytes: a 1-byte tag and a 1-byte zero. That is 20x on the structures alone, plus roughly 1.5x transient while the backing `Vec` doubles during growth.
40+
41+
A 64 MiB payload of zero varints inside one unknown group drives the decoder to about 1.4 GB of heap, a ~22x amplification. `Message::decode`, `Message::decode_from_slice`, and `MessageView::decode_view` all reach it. `DecodeOptions` caps top-level message length, but its default `DEFAULT_MAX_MESSAGE_SIZE` is roughly 2 GiB, and it caps *input* length, so it never sees a blow-up that starts small and expands during decode.
42+
43+
Validated against a server capped at 256 MiB under Docker: the 64 MiB payload OOM-killed it, exit 137 with `OOMKilled: true`. The proof of concept uses `google.protobuf.Empty`, which has no defined fields, so the wire-level analysis is unambiguous and the receiving message type never needs to declare a group field.
44+
45+
Impact: Denial of Service through memory exhaustion, unauthenticated wherever untrusted protobuf is decoded.
46+
47+
Fixed in 0.8.0, released 2026-06-25. Also tracked as CWE-400 and CWE-789. Found by pointing Endor Labs AI SAST at the library: the engine traced the length value from wire data to the `Vec<u8>` allocation and established that the only check between source and sink bounds the buffer rather than the allocation. The group amplification came from following that same function one branch further. Awarded a $600 bounty.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
status: published
3+
id: GHSA-j77w-g4jj-hp99
4+
title: Command Injection in Compiled Workflow via Unsanitized sandbox.mcp.env Exports
5+
project: gh-aw
6+
component: pkg/workflow/mcp_setup_generator.go
7+
cwe: CWE-78
8+
cvss: 9.6
9+
endor_id: ENDOR-VUL-2026-0906
10+
reported: 2026-06-09
11+
disclosed: 2026-08-07
12+
refs:
13+
ghsa: https://github.com/github/gh-aw/security/advisories/GHSA-j77w-g4jj-hp99
14+
credits:
15+
- Peyton Kennedy (p80n)
16+
---
17+
18+
Description: `gh aw compile` writes MCP-gateway environment variables into the generated GitHub Actions workflow (`.lock.yml`) through an unescaped `fmt.Fprintf`:
19+
20+
```go
21+
for _, envVarName := range envVarNames {
22+
fmt.Fprintf(yaml, " export %s=%s\n", envVarName, gatewayConfig.Env[envVarName])
23+
}
24+
```
25+
26+
The values arrive verbatim from the `sandbox.mcp.env` map in a workflow's frontmatter, and the workflow JSON schema constrains no characters in them. A value carrying `;`, `$(...)`, a backtick, or a newline breaks out of the `export` statement and lands in command position inside a `run:` shell block.
27+
28+
The adjacent export ten lines earlier does the right thing, which is what makes this a miss rather than a design choice:
29+
30+
```go
31+
escapedCLIServersJSON := shellEscapeArg(string(cliServersJSON))
32+
yaml.WriteString(" export GH_AW_MCP_CLI_SERVERS=" + escapedCLIServersJSON + "\n")
33+
```
34+
35+
Nothing validates the source either: `frontmatter_extraction_security.go` copies both key and value straight out of the parsed map.
36+
37+
The trust boundary is what carries the severity. `gh-aw` supports importing and packaging workflow components from third-party repositories, so a malicious shared component that declares `sandbox.mcp.env` executes arbitrary commands in the CI environment of any repository that imports it, compiles, and runs the workflow. Compiling a payload of three values in a sealed no-network container produced this in the generated lock file:
38+
39+
```
40+
export AAA_INJECT=legit; echo PWNED_$(id) > /tmp/pwned #
41+
export BBB_NEWLINE=ok
42+
echo PWNED_NEWLINE <- newline broke into command position
43+
export CCC_BACKTICK=`touch /tmp/PWNED_BACKTICK`
44+
```
45+
46+
Affects gh-aw through 0.77.5.
47+
48+
Impact: Command Execution in the GitHub Actions runner, with the job's `GITHUB_TOKEN` and secrets. Scope is Changed: the injected commands escape the authority of a workflow definition into the runner's execution environment.
49+
50+
Fixed in 0.86.0. No CVE was assigned, and the advisory is published at the repository rather than in the global GitHub Advisory Database.

links.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
kind: blog
1919
url: https://www.endorlabs.com/learn/ai-sast-finding-path-traversal-in-openclaw-via-llm-guardrail-bypass
2020
date: 2026-02-19
21+
- title: "Endor Labs' AI SAST Finds Zero Day Memory-Amplification DoS in Anthropic's buffa"
22+
kind: blog
23+
url: https://www.endorlabs.com/learn/endor-labs-ai-sast-finds-zero-day-cve-2026-55407-buffa
24+
date: 2026-06-30

0 commit comments

Comments
 (0)