skip to content

A PDF renderer fetches whatever URL a user's render job names, including the instance metadata endpoint. What threat do you raise?

level: seniorimportance: must knowfreq 58%

answer

  1. compare the caller's authority with the callee's
  2. the service reaches what the user cannot
  3. acting for someone, with your own rights
  4. nobody asked on whose behalf
  5. a deputy, confused

basics

~10 s

Elevation of Privilege by confused deputy: the renderer holds a network position and credentials the requesting user lacks, and acts on that user's input without checking on whose behalf. The user borrows its authority.

solid answer

~50 s

I would raise this as Elevation of Privilege, specifically a confused deputy. The renderer is a process that holds authority its callers lack - a network position inside the deployment and, through the metadata endpoint, the credentials of the workload identity it runs as. A low-privilege authenticated user cannot reach that endpoint, but the renderer can, and it will fetch whatever URL the job names without asking whether this requester is entitled to that fetch. The follow-on impact is everything those keys authorize. Calling it Information Disclosure describes the payload but hides the cause. The control is to strip the ambient authority from the fetch path: perform the fetch from a component with no privileged network position and no workload credentials to reach, deny by default which destinations a job may name, and make the requester's own authority - not the service's - the thing the fetch carries.

go deeper

for a junior

Be able to say that the service can reach something the user cannot, and that letting the user choose the destination hands them that reach. Naming it as an authorization problem is enough at this level.

for a middle

Explain the three ingredients - standing authority, attacker-chosen input, and no check on whose behalf - and why removing any one of them kills the threat. Know why a block-list of internal addresses is weak.

for a senior

Argue the category choice out loud: why elevation leads to better mitigations than disclosure, and how you rate severity by the reach of the borrowed credential rather than the leaked string. Expect to propose an ordered set of controls.

for a principal

Turn the single finding into a pattern the organisation can apply: which component shapes are candidate deputies, what the default posture for outbound job-driven fetches should be, and how you get that decided once rather than re-litigated per team.

## Reading the design The design has a user-facing submission path, a rendering process, and an outbound fetch from that process to whatever the job's HTML references. Draw the boundary where the render job crosses from the requester into the renderer, and then ask the question that finds confused deputies: **does this process act on input from a less-privileged source while holding authority that source lacks, without checking on whose behalf it acts?** Here the answer is yes on every clause. The requester is an authenticated but low-privilege customer. The renderer sits inside the deployment with a network position no customer has, and the instance metadata endpoint will hand out credentials for the identity the workload runs as. Nothing in the fetch consults the requester's rights. ## Why this is Elevation of Privilege, not Information Disclosure Both letters can be argued, and the argument is the interview. Information Disclosure names the payload: secrets end up in a rendered document. Elevation of Privilege names the mechanism: an actor performed an action - retrieve workload credentials - that it was never permitted to perform, by borrowing the authority of a process that was. Choose the category that leads to the right mitigation. If you file this as disclosure, the tempting fixes are about the output: redact the PDF, scan for secret-shaped strings. If you file it as elevation, the fix is about authority, and it also covers the cases where the fetched target is not a secret at all - an internal admin endpoint that performs a write, a health or control interface, a peer service that trusts anything originating inside the deployment. The same missing check produces all of them, which is what makes elevation the better label. The well-known vulnerability name for the mechanism is server-side request forgery; the *modeling* concept underneath it is the confused deputy, and the confused deputy is the pattern you should be able to spot in designs that have nothing to do with fetching URLs. ## What a confused deputy actually is A deputy is any component that acts for someone else while holding authority of its own. It becomes confused when it uses **its** authority to satisfy **their** request without deciding whether their rights cover it. The attacker needs no exploit; the deputy is working exactly as built. Three ingredients are always present: 1. Ambient authority - a credential, token or network reachability the process carries implicitly on every operation, not one supplied per request by the caller. 2. A less-privileged caller whose input steers what the deputy does with that authority. 3. No decision anywhere that maps the caller's rights onto the requested operation. Remove any one of the three and the threat dies, which is what makes this a productive category: it hands you three independent places to cut. ## Controls, strongest first **Remove the ambient authority from the fetch path.** Perform outbound job fetches from a component that has no workload credentials reachable and no privileged position - a separate process or network path whose reachability is the public internet only. This kills ingredient one and does not depend on getting a parser or a URL check right. **Constrain what a job may name, deny by default.** An allow-list of destinations for a render job is far stronger than a block-list of internal ranges, because block-lists have to anticipate every alias, redirect and rebinding trick that resolves back inside. **Make the caller's authority travel with the request.** Where the fetch genuinely must reach something internal, it should be authorized against the requester's rights rather than the service's, so the deputy can no longer lend out more than the caller has. **Detect.** Alarm on the renderer reaching destinations no legitimate job needs, and treat any use of the workload credential from an unexpected code path as an incident signal. This is a detective control - useful, but it does not answer the threat on its own, and a model that offers only this has not mitigated anything. ## Rating and follow-on Do not stop at "credentials leaked". The severity of an elevation threat is the reach of the authority that was borrowed, so the model should carry the follow-on: what does the workload identity authorize, and what would an attacker holding it be able to read, change or destroy? That question usually produces a second finding - the workload identity is broader than the renderer's job needs - and that finding is worth as much as the first. ## The generalisation worth taking away Any process that accepts an instruction from a less-privileged source and then performs work under its own standing authority is a candidate deputy: a webhook dispatcher, an import or export job, a template engine that can include remote resources, a callback handler, an admin utility that takes a target identifier. When you walk a diagram, the deputy test is faster than trying to enumerate techniques - compare the authority of the caller with the authority of the callee at every crossing, and look for a missing decision in between.

  • The team proposes blocking internal IP ranges in the fetcher. Is that a sufficient answer?
    It is a mitigation, not a sufficient one. A deny-list has to anticipate every way a name resolves back inside - redirects, alternate encodings, hostnames that resolve differently on a second lookup, addresses that are internal in one environment and not another. It also leaves the ambient authority in place, so the next feature that fetches something reopens the threat. I would treat it as defence in depth on top of removing the credentials and privileged reachability from the fetch path.
  • How would you record the severity of this threat in the model?
    By the reach of the borrowed authority, not by the immediate payload. The threat is not "a string appears in a PDF"; it is "an authenticated low-privilege customer obtains the workload identity's credentials and can do whatever that identity authorizes". That framing usually surfaces a second threat - the workload identity is broader than this component needs - and it prevents the team from rating it as a minor disclosure and deferring it.
  • Which other components in a typical product would you check for the same pattern?
    Anything that takes an instruction from a less-privileged caller and then acts under its own standing authority: webhook dispatchers, import and export jobs, template or document engines that can include remote resources, callback and preview handlers, and internal admin utilities that accept a target identifier. The test is the same at each - the caller supplies the target, the component supplies the authority, and no decision maps one onto the other.

A filing clerk holds keys to every cabinet in the building and will fetch whichever file you name on a slip of paper. You never pick a lock; you just write down a file you were never cleared to see, and the clerk's keys do the rest.

saying these in an interview costs you the question

  • Files it as Information Disclosure and fixes the output instead of the authority
  • Says the fix is authenticating render jobs, though callers are already authenticated
  • Treats a block-list of internal ranges as a complete answer
  • Rates it by the leaked string rather than the reach of the credential
  • Claims logging outbound fetches mitigates the threat
  • Assumes an exploit is needed, when the service behaves exactly as designed

context