Skip to content

Interview question · Application & API Security

Path traversal and zip-slip: why do they matter again when agents read and write files?

File tools take paths from the model, and the model takes ideas from whatever it read. A string check for '..' is not confinement.

mediumNewPreparation tags: Anthropic, OpenAI, MicrosoftUpdated Nov 2026

File tools take paths from the model, and the model takes ideas from whatever it read. A string check for '..' is not confinement.

Make your first attempt

What would you say before reading the answer?

  1. 01 State the assumptions your answer depends on.
  2. 02 Explain the mechanism and choose a control.
  3. 03 Name a condition that would change your decision.

The worked answer includes an approach, scoring criteria and follow-up questions. Compare the reasoning with your own.

signing in unlocks more free answers per topic

What if · the follow-ups in this answer

The answer works through 6 follow-ups like an interviewer would

An agent tool reads and writes files in a workspace directory given relative paths chosen by the model, and can also extract uploaded archives.

  1. What is path traversal?
  2. Why do agents bring it back?
  3. How do you confine paths correctly?
  4. What is zip-slip?
  5. What limits damage if a check is missed?
  6. How would you secure the file tool?

Each rung has a nudge, a model answer, the principle that carries over and the weak answer to avoid. Sign in free to open it.

UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet. Share a correction or a different way to answer it.