<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze" -->

---
title: Batch APIs that authorize only the first item | daily.dev
description: Bulk operation endpoints frequently validate permissions only against the first item in a batch request, then process the remaining items without individual...
canonical: https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Batch APIs that authorize only the first item | daily.dev
og:description: Bulk operation endpoints frequently validate permissions only against the first item in a batch request, then process the remaining items without individual...
og:url: https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze
og:image: https://api.daily.dev/og/posts/QMFJj96ze.png
og:image:alt: Batch APIs that authorize only the first item
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch APIs that authorize only the first item

**[Auth By Example](https://daily.dev/sources/7eadcwhmohx0bchehapmt)** · [@authbyexample](https://daily.dev/authbyexample) · 1 min read · 0 upvotes · 0 comments

## Summary

Bulk operation endpoints frequently validate permissions only against the first item in a batch request, then process the remaining items without individual checks. This creates a privilege escalation vector where an attacker submits one authorized ID alongside many unauthorized ones, sneaking unauthorized actions through. The fix is to authorize every resource in the batch individually, or reject the entire request if any single item fails authorization. This applies equally to multi-delete, multi-update, and GraphQL batch operations.

## Content

Bulk endpoints often check permission on the first ID in the list, then process the rest. An attacker who can pass one allowed ID plus many forbidden ones gets a quiet privilege escalation. Authorize every resource in the batch — or reject the whole request when any item fails. Same rule for multi-delete, multi-update, and GraphQL batching.

## Similar posts on daily.dev

- [Everyone Knows About Broken Authorization – So Why Does It Still Work for Attackers?](https://daily.dev/posts/everyone-knows-about-broken-authorization-so-why-does-it-still-work-for-attackers--exddy4tnt) · Security Boulevard · 1 upvotes · 0 comments
- [Designing safer listItems and getItem permissions](https://daily.dev/posts/designing-safer-listitems-and-getitem-permissions-knn0orlvr) · Advanced Web Machinery · 81 upvotes · 0 comments
- [Agents Turn Broken Auth Into a Breach at Machine Speed](https://daily.dev/posts/agents-turn-broken-auth-into-a-breach-at-machine-speed-ew6xjsbnf) · API Evangelist · 0 upvotes · 0 comments
- [BOLA: Enumerating an Entire Employee Directory Through a Predictable ID](https://daily.dev/posts/bola-enumerating-an-entire-employee-directory-through-a-predictable-id-5lh2ad7fu) · InfoSec Write-ups · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#graphql](https://daily.dev/tags/graphql), [#authorization](https://daily.dev/tags/authorization)

[View this post on daily.dev](https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze","headline":"Batch APIs that authorize only the first item","text":"Bulk operation endpoints frequently validate permissions only against the first item in a batch request, then process the remaining items without individual checks. This creates a privilege escalation vector where an attacker submits one authorized ID alongside many unauthorized ones, sneaking unauthorized actions through. The fix is to authorize every resource in the batch individually, or reject the entire request if any single item fails authorization. This applies equally to multi-delete, multi-update, and GraphQL batch operations.","url":"https://daily.dev/posts/batch-apis-that-authorize-only-the-first-item-qmfjj96ze","datePublished":"2026-09-21T11:27:41.643Z","dateModified":"2026-09-21T11:27:55.602Z","author":{"@type":"Person","name":"Auth By Example","url":"https://daily.dev/authbyexample","image":"https://media.daily.dev/image/upload/s--Fgz7IgGQ--/f_auto/v1789653205/avatars/avatar_7EADCwHmOHX0bChEhAPmt?_a=BAMAMicg0","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":60}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/7eadcwhmohx0bchehapmt","name":"Auth By Example"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Auth By Example","item":"https://daily.dev/sources/7eadcwhmohx0bchehapmt"},{"@type":"ListItem","position":3,"name":"Batch APIs that authorize only the first item"}]}
```

