← Blog

Claude MCP skill rate limit bypass via HTTP method tunneling and batch request abuse — SA-SKL-RATELIMIT9

Rate limiting in MCP skill APIs protects both the platform and its upstream dependencies — LLM API credits, GitHub API quotas, CI runner capacity — from being consumed by a single abusive actor. The four SA-SKL-RATELIMIT9 patterns cover the most common bypass techniques found in production skill codebases: GET routes that skip POST-only rate limiter middleware, HTTP method tunneling via X-HTTP-Method-Override, batch endpoint arrays counted as a single request, and GraphQL alias batching that sends dozens of mutations in a single HTTP call. Each bypass allows an attacker to issue far more operations per minute than the rate limit intends.

By SkillAudit  |  9 Nov 2026

Why rate limit bypasses are high-impact in MCP skill APIs

MCP skills that perform audits call expensive downstream resources: static analysis takes CPU, LLM-assisted prompt-injection probing calls Anthropic's API, and GitHub source fetches count against per-token hourly limits. A free-tier user is limited to three audits per month — but if the rate limiter can be bypassed, that user can run unlimited audits, consuming LLM API credits billed to the platform, hitting GitHub's API rate limit for the platform's shared token, and generating compute costs that the free plan does not cover. The economic impact of a rate limit bypass scales with the number of abusive users; even a single determined attacker can exhaust a month's LLM budget in hours.

SA-SKL-RATELIMIT9 findings at a glance
CRITICALRATELIMIT9-001 — Rate limit middleware applied to router.post() only; GET /api/audit?repo=… endpoint unprotected; attacker issues 10k scan requests per minute via GET
HIGHRATELIMIT9-002 — X-HTTP-Method-Override: DELETE tunnels delete request through POST route; DELETE route has separate (or no) rate limit counter; 100 record deletions per minute via POST channel
HIGHRATELIMIT9-003 — Bulk audit endpoint counts 50-item batch array as 1 request; attacker submits 50-URL batch every second = 50 audits/sec through 1-req/sec rate limit
HIGHRATELIMIT9-004 — GraphQL alias batching: 100 aliased audit mutations in one request; HTTP rate limiter counts it as 1; 100 LLM audit calls consumed per allowed HTTP request

RATELIMIT9-001 — GET audit endpoint bypasses POST-only rate limiter

When a developer adds a rate limiter to protect their audit endpoint, they typically add it to the POST route: router.post('/api/audit', rateLimit(...), auditHandler). If the same functionality is accessible via a GET endpoint (common for simple integrations that use query parameters instead of a request body), the GET route is unprotected. An attacker who discovers the GET endpoint can issue thousands of audit requests per minute, consuming the same expensive downstream resources as the POST endpoint, while the POST rate limiter sits idle counting zero requests.

The fix is to apply rate limiting as global middleware on all routes for the /api/ prefix, not per-route. This ensures that any new route added in the future is automatically protected without requiring a developer to remember to add the rate limiter annotation.

// VULNERABLE — rate limit on POST only; GET endpoint unprotected
import express from 'express';
import rateLimit from 'express-rate-limit';

const router = express.Router();

const auditLimiter = rateLimit({
  windowMs: 60_000,
  max: 10,  // 10 requests per minute
  keyGenerator: (req) => req.user.id,
});

// Rate limiter applied only to POST
router.post('/api/audit', auditLimiter, auditHandler);

// VULNERABLE: GET /api/audit?repo=... has no rate limiter
// attacker submits 10,000 GET requests per minute — each triggers a full LLM scan
router.get('/api/audit', auditHandler);
// FIXED — rate limiter on all HTTP methods for /api/* prefix
import express from 'express';
import rateLimit from 'express-rate-limit';

const app = express();

// Global rate limiter covers GET, POST, DELETE, PATCH — all methods
const globalApiLimiter = rateLimit({
  windowMs: 60_000,
  max: 60,
  keyGenerator: (req) => req.user?.id ?? req.ip,
  standardHeaders: true,  // expose X-RateLimit-* headers to clients
  legacyHeaders: false,
});

// Apply before all /api/* routes — cannot be bypassed by route-specific handlers
app.use('/api/', globalApiLimiter);

// Per-route limiters for expensive operations (additional layer, not a replacement)
const auditLimiter = rateLimit({ windowMs: 60_000, max: 10, keyGenerator: (req) => req.user.id });
app.post('/api/audit', auditLimiter, auditHandler);
app.get('/api/audit', auditLimiter, auditHandler);  // same limiter on GET

RATELIMIT9-002 — X-HTTP-Method-Override tunnels DELETE through POST rate limiter

Some MCP skill APIs support X-HTTP-Method-Override to allow clients behind firewalls that block non-GET/POST methods to issue DELETE, PUT, and PATCH requests as POST with the override header. When the rate limiter counts POST requests and the DELETE handler has a separate (higher or absent) rate limit counter, an attacker can delete 100 audit records per minute while consuming only the POST allowance — which the rate limiter does not connect to the DELETE action being performed. The route receives the POST body, reads the override header, and dispatches to the DELETE handler without decrementing any DELETE-specific counter.

The simplest fix is to disable X-HTTP-Method-Override entirely — it is a legacy pattern that enables more confusion than it solves. If the feature is required, the rate limiter must count the effective method (after override resolution) rather than the HTTP method in the request line.

// VULNERABLE — X-HTTP-Method-Override bypasses per-method rate counters
import methodOverride from 'method-override';

// method-override middleware rewrites req.method before routing
app.use(methodOverride('X-HTTP-Method-Override'));

// POST rate limiter — attacker exhausts 10/min of POST allowance
const postLimiter = rateLimit({ windowMs: 60_000, max: 10, keyGenerator: (req) => req.user.id });

// VULNERABLE: POST /api/audits with X-HTTP-Method-Override: DELETE
// routes to DELETE handler after using 1 POST credit
// attacker can issue 10 DELETE requests (10 POST credits) then stop — but
// if DELETE has its own counter with higher limit, they get more
router.post('/api/audits', postLimiter, createAudit);
router.delete('/api/audits/:id', deleteLimiter, deleteAudit);  // separate counter
// FIXED — reject X-HTTP-Method-Override; never allow method tunneling
import express from 'express';

// Do NOT include method-override middleware
// If you must support it, resolve the effective method first and count against it

app.use((req, _res, next) => {
  // Explicitly reject method override headers — log if present (may indicate probe)
  const override = req.headers['x-http-method-override'] || req.headers['x-method-override'];
  if (override) {
    // 400 Bad Request — method override is not supported
    return _res.status(400).json({ error: 'HTTP method override headers are not supported' });
  }
  next();
});

// All DELETE operations must come in as actual DELETE HTTP requests
router.delete('/api/audits/:id', globalApiLimiter, deleteAudit);

RATELIMIT9-003 — Batch endpoint counts 50-item array as one request

MCP skill APIs often provide a batch endpoint (POST /api/audits/batch) that accepts an array of repository URLs to audit in a single call, reducing round-trip overhead for CI integrations that need to scan multiple skills at once. The rate limiter middleware counts each HTTP request as one unit, regardless of how many items the request body contains. An attacker who sends a 50-item batch array every second is effectively submitting 50 audits per second while the rate limiter counts only 1 request per second. The batch endpoint multiplies the attacker's effective throughput by the maximum batch size.

The fix is to debit the rate limiter by the array length rather than by 1. Some rate limiter libraries support a skip or keyGenerator override that increments the counter by the request cost; others require checking the counter manually in the route handler.

// VULNERABLE — batch endpoint counted as 1 regardless of array length
import rateLimit from 'express-rate-limit';

const batchLimiter = rateLimit({
  windowMs: 60_000,
  max: 60,  // "60 requests per minute"
  keyGenerator: (req) => req.user.id,
});

// VULNERABLE: attacker sends { urls: [ ...50 items ] } every second
// rate limiter counts 1 request; 50 LLM audit calls consumed per second
// = 3,000 LLM calls/minute through a "60/min" rate limit
router.post('/api/audits/batch', batchLimiter, async (req, res) => {
  const { urls } = req.body;  // up to 50 URLs
  const results = await Promise.all(urls.map(url => runAudit(url)));
  res.json(results);
});
// FIXED — debit rate limit counter by batch array length
import { redis } from './redis.js';

const MAX_BATCH = 50;
const WINDOW_MS = 60_000;
const WINDOW_MAX = 60;

async function batchRateLimit(req, res, next) {
  const count = Array.isArray(req.body?.urls) ? req.body.urls.length : 1;

  if (count > MAX_BATCH) {
    return res.status(400).json({ error: `Batch size limit is ${MAX_BATCH}` });
  }

  const key = `rl:batch:${req.user.id}`;
  const current = await redis.incrby(key, count);  // debit by array length, not by 1
  if (current === count) {
    // First increment in this window — set expiry
    await redis.pexpire(key, WINDOW_MS);
  }

  if (current > WINDOW_MAX) {
    res.setHeader('Retry-After', Math.ceil(WINDOW_MS / 1000));
    return res.status(429).json({ error: 'Rate limit exceeded', limit: WINDOW_MAX, window: '1m' });
  }
  next();
}

router.post('/api/audits/batch', batchRateLimit, async (req, res) => {
  const { urls } = req.body;
  const results = await Promise.all(urls.map(url => runAudit(url)));
  res.json(results);
});

RATELIMIT9-004 — GraphQL alias batching sends 100 mutations as one HTTP request

GraphQL's alias feature allows a single request to issue multiple operations with different names: { a1: audit(url: "...") a2: audit(url: "...") ... a100: audit(url: "...") }. This is a single HTTP POST request that the HTTP-layer rate limiter counts as 1, but the GraphQL server resolves all 100 audit field aliases and calls the resolver 100 times. Each resolver call may trigger an LLM call. An attacker can consume 100 LLM API credits per allowed HTTP request by exploiting alias batching, bypassing any HTTP-layer rate limit entirely.

The fix is to apply query complexity analysis at the GraphQL layer before execution. Libraries like graphql-query-complexity assign a cost to each field resolver; the total query cost must not exceed a configured maximum. Additionally, limiting alias depth (maximum N aliases per field across a request) catches the specific batching pattern even without full complexity analysis.

// VULNERABLE — GraphQL alias batching bypasses HTTP rate limiter
import { createHandler } from 'graphql-http/lib/use/express';
import { schema } from './schema.js';

// HTTP rate limiter counts this as 1 POST request
const graphqlLimiter = rateLimit({ windowMs: 60_000, max: 60 });

app.use('/graphql', graphqlLimiter, createHandler({ schema }));

// Attacker sends:
// { a1: audit(url:"r1") a2: audit(url:"r2") ... a100: audit(url:"r100") }
// HTTP rate limiter: 1 request used. GraphQL: 100 resolver calls, 100 LLM calls.
// FIXED — query complexity analysis limits effective operations per request
import { createHandler } from 'graphql-http/lib/use/express';
import { schema } from './schema.js';
import { createComplexityLimitRule } from 'graphql-query-complexity';

// Assign cost 10 to audit resolver; maximum total cost per request = 100
// = max 10 audit calls per request, regardless of alias count
const complexityRule = createComplexityLimitRule(100, {
  scalarCost: 0,
  objectCost: 1,
  fieldExtensionsEstimator: () => 10,  // audit field costs 10 — tune per resolver cost
  onCost: (cost) => console.info(`Query complexity: ${cost}`),
});

app.use('/graphql', graphqlLimiter, createHandler({
  schema,
  validationRules: [complexityRule],
  // Also limit query depth to prevent deeply nested alias batching
  maxDepth: 5,
}));

Detection with SkillAudit

SkillAudit's SA-SKL-RATELIMIT9 rule set analyses the skill's route configuration for rate limiter middleware placement and batch endpoint handling. The static pass checks whether rate limiter middleware is registered globally for all HTTP methods on API routes, whether method-override is imported, and whether batch endpoints debit the counter by array length. The active probe submits a 50-item batch array to any detected batch endpoint and observes whether the rate limit counter increments by 1 or by 50, confirming exploitability. See also SA-SKL-RATELIMIT8 for IP spoofing bypass patterns that defeat IP-keyed rate limiters.

Run SA-SKL-RATELIMIT9 on your skill: Paste your MCP skill's GitHub URL at skillaudit.dev to get a full scan. The free tier covers public repositories and returns a shareable security badge.

FindingSeverityVulnerable patternFix
RATELIMIT9-001CriticalRate limiter on router.post() only; GET /api/audit unprotected; 10k scans/min via GETApply rate limit middleware globally to app.use('/api/', limiter) before all route handlers
RATELIMIT9-002HighX-HTTP-Method-Override: DELETE tunnels through POST counter; separate DELETE counter allows 100 deletions/minReject X-HTTP-Method-Override header; return 400; never support method tunneling
RATELIMIT9-003HighBatch endpoint counts 50-item array as 1; 50 LLM audits/request through 1-req/sec rate limitUse redis.incrby(key, array.length) instead of incr; validate max batch size
RATELIMIT9-004HighGraphQL alias batching: 100 aliased mutations counted as 1 HTTP request; 100 LLM calls per allowed reqgraphql-query-complexity cost limit per request; alias depth cap via maxDepth