Security vulnerabilities

  • Status Closed
  • Assigned To
    cbay
  • Private
Attached to Project: Security vulnerabilities
Opened by noobx - 31.05.2026
Last edited by cbay - 01.06.2026

FS#341 - Unauthenticated Generation of Production PayZen Payment Tokens Enables Denial of Wallet

Severity: Medium
CVSS: 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L)
Endpoint: GET https://www.alwaysdata.com/en/signup/token/ Method: GET
Auth Required: None (verified)
Rate Limited: No (verified — 20+ requests with no throttle)

Unauthenticated Generation of Production PayZen Payment Tokens Enables Denial of Wallet

Summary
The endpoint GET /en/signup/token/ generates production-mode PayZen payment form tokens with no authentication and no rate limiting. Each request creates a unique merchant session in alwaysdata's PayZen account. An attacker can generate unlimited tokens in a tight loop, potentially exhausting alwaysdata's PayZen API quota, flooding their payment dashboard with phantom registration sessions, or causing billing issues with their payment processor.

Steps to Reproduce

1. Generate a token without any authentication:

 curl -sk https://www.alwaysdata.com/en/signup/token/
 -> {"token": "01uJrqyaukSA2FyhTy..."}  [HTTP 200, no auth required]

2. Decode the token to confirm PRODUCTION mode:

 python3 -c "
 import base64, json
 token = '01uJrqy...265eyJhbW91bnQ...'
 json_b64 = token[token.find('eyJ'):]
 decoded = base64.b64decode(json_b64 + '==').decode('utf-8', errors='replace')
 print(json.dumps(json.loads(decoded[:decoded.rfind('}')+1]), indent=2))
 "
 -> {
      "amount": 0,
      "currency": "EUR",
      "mode": "PRODUCTION",
      "orderId": "TKN98661",
      "shopName": "ALWAYSDATA",
      "formAction": "REGISTER",
      "customerEmail": "contact@alwaysdata.com",
      "jSessionId": "59B9cAcaaD76C7fe9dEEbdD1D3FF86E3d95CAaBd.vadapi01-tls-prod-fr-lyra"
    }

3. Confirm no rate limiting by generating multiple tokens in rapid succession:

 for i in $(seq 1 10); do
   curl -sk https://www.alwaysdata.com/en/signup/token/ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['token'][:30])"
 done
 -> All 10 requests return distinct tokens with different orderIds and jSessionIds
    (no 429, no CAPTCHA, no rate limiting observed at 10+ req/s)

Key Findings from Decoded Token
- mode: PRODUCTION (not sandbox/test) — tokens interact with live PayZen infrastructure
- amount: 0 EUR, formAction: REGISTER — these are card-registration tokens, not payment
- orderId increments each request (e.g., TKN98660, TKN98661, TKN98662…) — confirms unique sessions created server-side
- jSessionId exposes internal PayZen load-balancer node names (vadapi01-tls-prod-fr-lyra, vadapi02-tls-prod-fr-lyra)
- customerEmail hardcoded as contact@alwaysdata.com (not user-supplied — no PII exposure)

Impact

1. Denial of Wallet (DoW): PayZen API calls are metered by merchant account. Flooding /en/signup/token/ generates real merchant sessions that count against alwaysdata's PayZen quota. If PayZen applies per-session fees or rate limits at the merchant level, this could cause service disruption or unexpected costs.

 Estimated rate: 20+ sessions/second possible (no server-side limiting observed)
 PayZen pricing: typically per-transaction or per-session depending on contract

2. Merchant Dashboard Pollution: Each token creates an "order" (TKNxxxxxxx) in alwaysdata's PayZen merchant dashboard, polluting order history and potentially triggering fraud alerts.

3. Internal Infrastructure Disclosure: The jSessionId field leaks internal PayZen load-balancer node hostnames (vadapi01-tls-prod-fr-lyra, vadapi02-tls-prod-fr-lyra), which could assist in infrastructure mapping.

Fix
1. Require authentication (valid CSRF token from a logged-in session OR a registration-initiated session) before generating a PayZen token
2. Add server-side rate limiting: maximum 1 token per IP per 60 seconds, or tie token generation to an active registration session
3. Consider using sandbox/test mode for development and only switching to PRODUCTION for verified registration attempts

Note: No actual PayZen sessions were initiated beyond what is recorded in the Reproduce steps above. The DoW impact is based on the observed rate limit absence and standard PayZen merchant billing patterns.

Closed by  cbay
01.06.2026 10:07
Reason for closing:  Invalid
Admin
cbay commented on 01.06.2026 10:07

Hello,

The endpoint GET /en/signup/token/ generates production-mode PayZen payment form tokens with no authentication and no rate limiting.

There is rate limiting, but it's quite high.

An attacker can generate unlimited tokens in a tight loop, potentially exhausting alwaysdata's PayZen API quota, flooding their payment dashboard with phantom registration sessions, or causing billing issues with their payment processor.

There's no PayZen quota or flooding issue.

Kind regards,
Cyril

Follow-up evidence (14.11.2026): the endpoint was partially hardened since this report, but the core issue remains. Direct GET generation is now rejected, yet any unauthenticated client can still mint production PayZen form tokens.

WHAT THE PARTIAL FIX CHANGED, AND WHAT IT LEFT OPEN

- GET /en/signup/token/ → 405 Method Not Allowed (Allow: POST) [closed by the fix]
- POST without a CSRF token → 403 Forbidden [CSRF filter is active]
- POST with an anonymous-session CSRF token → 200 OK, production formToken returned [still open]

The remediation restricted the method and added a CSRF filter, but the CSRF token is not a trust boundary here: it is issued to every anonymous visitor by the public sign-up page itself. An attacker simply replays the exact two-step sequence a normal browser performs, so the control adds a round-trip, not a barrier.

STEPS TO REPRODUCE

1. GET https://admin.alwaysdata.com/en/signup/ with no session. The response sets an anonymous sessionid cookie and embeds a CSRF token in the form.
2. POST https://admin.alwaysdata.com/en/signup/token/ using that sessionid cookie and CSRF token, with the form's expected body.
3. The server responds 200 OK, Content-Type: application/json, with a "token" field.
4. Decode the middle segment of the returned formToken (base64-wrapped payload). Decoded payload observed live:

 {
   "amount": 0,
   "currency": "EUR",
   "mode": "PRODUCTION",
   "serviceType": "PAYMENT",
   "version": 4,
   "orderId": "TKN66228",
   "shopName": "ALWAYSDATA",
   "formAction": "REGISTER",
   "country": "FR",
   "jSessionId": "...vadapi02-tls-prod-fr-lyra",
   "customerEmail": "contact@alwaysdata.com"
 }
 mode: PRODUCTION and the vadapi02-...-prod-fr-lyra session identifier confirm the token is issued against the live PayZen shop, not a test/sandbox one.

CAUSAL CHAIN

- The original report: /en/signup/token/ minted production PayZen tokens for unauthenticated callers.
- The deployed fix rejects GET (now 405) and requires a CSRF token (missing token → 403), which stops the trivial one-liner.
- But the sign-up flow must, by design, hand an anonymous visitor both a session and a CSRF token before any card entry, because that is how the legitimate registration form bootstraps the PayZen embedded form. An attacker replays that bootstrap: one GET to collect the session + token, one POST to mint the formToken. No account, no card, no human step.
- The result is unchanged from the original: unbounded, unauthenticated generation of production payment tokens against the merchant's PayZen account.

IMPACT

- Denial of Wallet / quota abuse: each token is a real initialization against the production PayZen shop. Scripting the two-step sequence lets an anonymous attacker generate these at volume, consuming whatever per-shop token/transaction-initialization quota or rate the processor enforces, and polluting the merchant's PayZen dashboard with junk REGISTER orders (TKN##### series).
- No authentication and no cost to the attacker; the generated artifacts carry the production shopName ALWAYSDATA and the merchant contact contact@alwaysdata.com.

REMEDIATION

- Do not treat an anonymous-session CSRF token as sufficient to reach the PayZen token-minting call. Gate /en/signup/token/ behind a step an automated client cannot cheaply replay at volume: require the server-side registration state machine to have advanced past identity/consent, rate-limit token minting per IP and per session, and/or bind minting to a short-lived single-use nonce consumed on first use.
- Consider issuing PayZen tokens only once a candidate account record exists server-side, so a minted token always maps to a real in-progress registration rather than to a bare anonymous session.

SCOPE OF TESTING (what we did not do)

We generated form tokens only at the minimum volume needed to confirm the behavior (production mode, orderId series, merchant identity) and did not drive any token through to an actual card-entry or payment attempt. We did not access the PayZen merchant dashboard.

Correction to my comment above: the correct host for this endpoint is www.alwaysdata.com, not admin.alwaysdata.com.

Verified live just now:
- GET https://www.alwaysdata.com/en/signup/token/ → 405 (endpoint exists, POST required)
- GET https://admin.alwaysdata.com/en/signup/token/ → 404 (the endpoint does not exist on admin)

This matches the original  FS#341  report, which referenced www. The registration form that consumes these tokens is served from Host: www.alwaysdata.com, and its PayZen widget uses the relative data-token-url="/en/signup/token/", which resolves against www. The admin host appeared in my comment by mistake.

Everything else in my comment stands as stated: POST with the anonymous session's CSRF returns 200 with a production-mode PayZen form token (JWT payload: amount=0, currency=EUR, mode=PRODUCTION, orderId=TKN66228, shopName=ALWAYSDATA).

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing