# many commands can be manipulated to delete identities or affiliations

Fabric-ca signs only the Authorization header and body, so an attacker who sniffs any request can change the method to DELETE and target identities/affiliations via the unsigned URL path.

- Payout: $500
- Severity: medium
- Program: Linux Foundation Decentralized Trust
- Found by: cet2000
- Disclosed: 2022-08-10
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/348090
- Library page: https://bugbountylibrary.com/r/h1%3A348090
- Tags: area:web domain:api domain:web impact:data-leak impact:integrity kind:bounty platform:hackerone sev:medium technique:recon vuln:access-control vuln:auth-bypass

**Target:** Hyperledger Fabric-ca REST API (identities/affiliations endpoints)
**Root cause:** Signature-based auth covers only the Authorization header and request body; DELETE handlers read the identity/affiliation identifier from the URL path, which is unsigned, and the HTTP method is not bound to the signature.
**Steps:**
1. Capture any legitimate signed request from client to fabric-ca (e.g. `GET /identities` or `POST /identities`).
2. Change the HTTP method to `DELETE`.
3. Set the path to the target resource: `DELETE /identities/admin2 HTTP/1.1` or `DELETE /affiliations/org1.dep2?force=true HTTP/1.1`.
4. Replay the request; server accepts because signature still validates over unchanged header/body while path/method are attacker-controlled.
**How found:** Observed that fabric-ca signs only the Authorization header and body, then reasoned that DELETE handlers pull the target identifier from the URL path, which is outside the signed envelope; tested by mutating method and path of captured requests.
**Exploitation:** Attacker sniffs a valid signed request, rewrites method to DELETE and substitutes the URL path with any valid identity or affiliation name, then replays it. Server-side auth validates only header+body signature, so the deletion executes, removing arbitrary identities/affiliations (requires server started with --cfg.identities.allowremove and --cfg.affiliations.allowremove).
**Insight:** When a protocol signs only headers/body, check whether resource identifiers or the HTTP method live in the unsigned URL path—method-override or path-swap on any captured signed request can reach destructive handlers.

