RISKS — GatewayQR-MunicVAllende
HIGH
- R-01 — No real-world corpus of municipal API traffic. Every payload used today comes from
the illustrative examples in the doc. Mitigation: once sandbox credentials arrive, capture real
request/response pairs (create, query, cancel, expired charge, error responses) into
corpus/muni-sandbox/. Owner: operator (requests credentials from Dirección de Modernización). Due: 2026-11-17. - R-02 — Cancelling a PAID QR payment has no API. The POS must be able to cancel a QR payment,
but
POST /cobro/{id}/anularonly works on PENDIENTE charges; a paid one needs a refund ("devolución") the doc leaves out of scope. Blocks the "cancel a paid payment" use case. Owner: operator (ask the Muni). Due: open. -
R-03 — Local timeout shorter than server expiry. The doc suggests a 90 s POS timeout with a 180 s default
expira; a payment can complete after the POS gave up. Mitigation in design: cancel on local timeout and re-query on 409. Addressed by ADR-003 (gateway owns the clock,TIMEOUT_RX ≥ 210 s, abandonment cancel) and POS change 3 (Esc →trxanulacion). -
R-09 — A POS restart during the fiscal close drops a paid QR line. Observed on the POS bench on 2026-11-18. Evidence:
docs/evidence/2026-11-18/run4/pos_daylog_1354_1407.txt, the POS day log with personal data redacted; see the evidence README, "Case G ticket". - Payment. Ticket 317131 opened at 13:54:45 with one 3000 item. The gateway marked attempt 24 PAID at 13:56:25, and the POS received the approval at 13:56:29.
- Interrupted close.
- The fiscal close started at 13:56:31.
- The CAE request failed at 13:56:41.
ConsultarComprobantewas still running at 13:56:49. - The POS was then restarted (next boot 13:57:03) before the close finished. On the bench the operator restarted it; the log shows only the gap. A crash or power cut is untested.
- Restored ticket. After the restart ("Reinicio con ticket:317131 con items!", 13:57:25) the POS restored the item but not the paid PAGO QR line, so the ticket asked for the 3000 again.
- Paid twice.
- When the close started again at 14:05:57, the ticket held 3 items (9000) and two payment lines: PAGO QR 3000 and EFECTIVO 6000. The first item had been paid a second time.
- That close did not finish on the bench, because the bench was stopped at 14:06:18. A failed CAE request does not stop a close: this build falls back to a CAEA invoice, as the 13:05 to 13:36 closes did. That fallback needs a valid CAEA stored on the POS; without one a failed CAE can stop or lengthen the close.
Production window. It runs from the QR approval to the end of the fiscal close. On this bench, closes whose CAE service did not answer took about 23 to 26 s to the invoice and drawer lines; earlier closes in the same log took 13 to 14 s to the invoice line. The close goes on after the drawer lines until "Comienza nuevo Ticket" (about 30 s on this bench); a restart in that tail left the ticket number unchanged (13:36 close). A restart, crash or power cut in that window would leave the payer charged by the Muni while the POS asks for the money again. The gateway keeps the attempt paid and never charges twice: the second collection happens at the till.
Interim rule. It is in the cashier sheet (docs/cajero-billetera-municipal.md) and in RUNBOOK
section 7.2: after a POS restart in the middle of a sale, or when the payer says they already paid, the
cashier does not collect again until the supervisor checks the cockpit.
Next step. Reproduce on a real POS: pay by QR, restart during "obteniendo nro Factura CAE", check the restored ticket. Then decide with the POS owner whether a restored ticket must re-read its PAGO QR state. This is pre-existing CYRE POS behavior, outside the gateway.
Owner: CYRE (POS). (origin: agent)
- R-10 — JDK Base64 intrinsic flaw (CVE-2026-114938, "Java4Shell"). Published 2026-11-17: on x86-64
CPUs with AVX-512 VBMI (Intel Ice Lake or later, AMD Zen 4 or later), the C2-compiled
java.util.Base64decoder of OpenJDK 17.0.6 and later writes past its buffer when it decodes a crafted padded input. That can leak heap memory or lead to code execution. The gateway runs on Temurin 25, which is affected.
Listed as HIGH because a trigger means code execution on the payment server; the exposure is low.
Exposure. Low: the gateway decodes Base64 only for its master key (configuration) and the stored API
keys (database). HTTP Basic, remember-me and the Xor CSRF handler are not used, and the service listens
only on the address set in server.address, which production sets to the VPN interface. A library
decoding attacker input cannot be ruled out.
Mitigation. The service starts with -XX:-UseBASE64Intrinsics (RUNBOOK section 4.3; an existing
service is updated off-hours with "Existing service" at the end of that section).
Next steps.
- Check the server's CPU with the service's JDK: java -Xlog:os+cpu -version lists the CPU features; the
flaw needs avx512_vbmi. Without it the flaw cannot trigger. Keep the flag either way: it is safe on any CPU.
- Install the Temurin 25 update that fixes the CVE once it is published (OpenJDK advisory of
2026-11-17). Then the flag can be dropped and this risk closed.
Owner: operator. (origin: agent; the flag was approved by the user on 2026-11-18)
MEDIUM
- R-04 — Client-side rejection is invisible.
SALDO_INSUFICIENTEand similar errors reach only the payer's app; the charge stays PENDIENTE until it expires. - R-05 — Contradiction between docs. The security PDF describes a fixed QR per terminal for large merchants (amount typed by the payer, no API); the API doc describes a dynamic QR created by the terminal. Resolved: the operator confirmed the dynamic QR per charge (API doc) on 2026-11-17; the fixed QR is out of scope (SPEC O5).
- R-06 — Undefined API behavior (confirm in sandbox or with the Muni): same
referenciaExternawith a different amount;expiraEnSegundos> 600; CUIT/API key mismatch error; atomicity of the cancel-vs-pay race; whether a re-POST returnscodigo; 403/429/5xx responses; the response shape of/comercio/{cuit}/movimientos(needed for the O3 reconciliation screen). Slices 1 and 2a run on 19 provisional assumptions (slice 2a added: a numericmontoin a charge answer is compared with the attempt amount) marked// ASSUMPTION (RISKS R-06)in the code (rg "ASSUMPTION \(RISKS R-06\)"lists them): network timeouts (create 1.5 s, others 5 s); 5xx = unknown outcome (retried), other 4xx = rejection; a reused create is followed by a query to getidTransaccion; master key fromGQRM_SECURITY_MASTER_KEY; POS denial shapes (HTTP 409/404{status, message}, read by the POS atpos_ctoq.cpp:3472-3477); emulator shapes for/pagar,/movimientos,/saldo,expiraEnSegundos > 600refused, any non-blank API key accepted. Each is checked against the sandbox corpus when it exists (R-01). (origin: agent, confirmed as provisional: 2026-11-16) - R-08 — CYRE POS rollout settings. Every POS enabling this method needs
TIMEOUT_RX ≥ 210 sand the new poll-interval key; a POS left at defaults abandons payable charges. Mitigation: rollout checklist indocs/RUNBOOK.md. Owner: operator. (origin: agent, confirmed: 2026-11-16)
LOW
- R-07 — Real-time notification (SignalR) is unspecified (no hub URL, auth or event schema). Out of scope for v1.