# Negative Quantity / Amount Manipulation

> Detects shopping cart and transaction logic that accepts negative quantities or amounts, enabling credit manipulation.

- Skill: `zakirkun/negative-quantity-amount-manipulation` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/negative-quantity-amount-manipulation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/negative-quantity-amount-manipulation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/negative-quantity-amount-manipulation

---


# Negative Quantity / Amount Manipulation

## Overview
Without server-side validation that quantities and amounts must be positive, attackers can submit negative quantities to:
- Receive a refund without returning items
- Add negative-priced items to reduce total to zero or below
- Earn loyalty points by creating and cancelling negative transactions

## Remediation
- Validate all quantity and amount fields are strictly positive (> 0)
- Validate total order amount is positive before processing payment
- Use unsigned integer types where possible

