An upload endpoint takes certificate bytes and a destination, then updates trust material for that destination. It checks your role, not whether the destination is yours.
What goes wrong
An endpoint accepts certificate content and an identifier for where it should go, then calls an operation that installs or replaces trust material for that target. The controller authorizes the caller by role. That is the entire access decision.
The target identifier comes from the request. Nothing checks that the caller is allowed to modify trust for that specific domain, so a user with the right role can name a domain that is not theirs and push certificate material into its trust configuration. Whoever relies on that trust store now trusts whatever the attacker uploaded.
Role says the caller is allowed to do this kind of thing. It does not say they are allowed to do it to this object. When the object is trust material for an arbitrary domain, the distance between those two statements is the whole vulnerability.
The pattern
@RequireRole('cert-admin')
def putDomainTrust(req):
domain = req.targetDomain # caller names the target
cert = req.certBytes
trustStore.update(domain, cert) # no owner check
return ok()@RequireRole('cert-admin')
def putDomainTrust(req):
domain = req.targetDomain
if not caller.managesDomain(domain): # object-level check
deny()
cert = parseAndValidate(req.certBytes)
trustStore.update(domain, cert)
audit(caller, 'trust-update', domain)Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.
Why it matters to you
Trust material is a high-value target because it changes what your systems believe. Overwrite the wrong trust anchor and you can enable interception or the silent acceptance of forged certificates for a domain the attacker had no business touching. One role, granted a little too broadly, becomes cross-domain control.
Role checks scale poorly to resource ownership. Every endpoint that acts on a caller-named object needs a second decision: is this caller allowed to act on this object? Put that check in the service, close to the write, where it cannot be skipped.
Check your own code
- List endpoints that write trust or key material to a named target
- Add an ownership check binding the target to the caller in the service
- Never rely on a role alone to authorize a per-object write
- Audit every trust-store change with caller and target recorded