PLX-2025-001  ·  Confidential
Security Assessment Web Application 4 Critical  ·  3 High

Penetration Test Report
[REDACTED] API

Black-box and grey-box security assessment of the [REDACTED] v3.2 REST API surface, authentication infrastructure, and administrative control plane. Conducted under authorised engagement agreement ref. ENG-2025-0347.

Report ID PLX-2025-001
Assessment Date Jan 06 – Jan 17, 2025
Report Version v1.0 — Final
Conducted by Plaidnox InfoSec
01 — Abstract

Executive Summary

Plaidnox InfoSec conducted an authorised penetration test of the [REDACTED] API v3.2 on behalf of [REDACTED] between January 6 and January 17, 2025. The engagement encompassed a full black-box reconnaissance phase followed by grey-box authenticated testing of the REST API surface, OAuth 2.0 authentication layer, administrative control plane, and associated file-handling infrastructure.

The assessment identified 14 vulnerabilities across five severity tiers. Four findings are rated Critical and represent immediate risk to customer data confidentiality and platform integrity. An unauthenticated SQL injection vulnerability in the transaction search endpoint allows full database extraction without valid credentials, representing the most severe finding of this engagement. Two authentication bypass conditions were identified that together allow an attacker to escalate from a standard user account to an administrative session without knowledge of any administrator credentials.

Immediate remediation is required for all Critical and High findings prior to the next production deployment. Plaidnox recommends a follow-up verification assessment within 60 days of remediation to confirm resolution.


02 — Scope & Methodology

Assessment scope

Target Application
[REDACTED] API
Version
v3.2.1 (build 20250103)
Environment
Staging (isolated)
Primary Endpoint
api.staging.reducted.io
Admin Panel
admin.staging.reducted.io
Assessment Type
Black-box + Grey-box

Methodology

The assessment followed the OWASP Testing Guide v4.2 and OWASP API Security Top 10 (2023) as the primary methodology framework, supplemented by PTES (Penetration Testing Execution Standard) for reconnaissance and exploitation phases. CVSS v3.1 was used for vulnerability scoring. Testing was conducted manually with tooling support from Burp Suite Professional, sqlmap, and custom scripts developed by the Plaidnox team.

All testing activities were performed exclusively within the agreed scope boundaries. No production systems were accessed. A full activity log is available upon request under the engagement agreement.


03 — Findings Summary

Vulnerability overview

4
Critical
3
High
4
Medium
2
Low
1
Info

All findings at a glance

ID Title Severity CVSS OWASP
PLX-001 Unauthenticated SQL Injection in Transaction Search Critical 9.8 API1:2023
PLX-002 JWT Algorithm Confusion — RS256 to HS256 Downgrade Critical 9.1 API2:2023
PLX-003 IDOR on Account Balance and Transaction History Critical 8.6 API1:2023
PLX-004 Admin Role Assignment via Mass Assignment Vulnerability Critical 8.8 API6:2023
PLX-005 Stored XSS in User Profile Display Name High 7.4 API8:2023
PLX-006 Missing Rate Limiting on OTP Verification Endpoint High 7.5 API4:2023
PLX-007 Sensitive Data Exposure in API Error Responses High 6.5 API3:2023
PLX-008 Insecure Direct Object Reference on Document Export Medium 5.3 API1:2023
PLX-009 CORS Misconfiguration Allows Arbitrary Origin Medium 5.4 API7:2023
PLX-010 Password Policy Does Not Enforce Minimum Complexity Medium 4.3 API2:2023
PLX-011 Verbose Stack Traces Exposed in Production Responses Medium 4.0 API7:2023
PLX-012 Session Token Not Invalidated on Logout Low 3.1 API2:2023
PLX-013 Missing HSTS Header on All API Endpoints Low 3.1 API7:2023
PLX-014 Internal IP Address Disclosed in X-Forwarded-For Header Info 0.0 API7:2023

04 — Detailed Findings

Technical finding detail

The following section documents each finding in full detail, including reproduction steps, CVSS breakdown, and evidence of exploitability. All findings were verified in the staging environment under the authorised engagement.

PLX-001 Unauthenticated SQL Injection in Transaction Search
Critical CVSS 9.8
Score9.8
Attack VectorNetwork
Attack ComplexityLow
PrivilegesNone
User InteractionNone
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
OWASP API1:2023 — Broken Object Level Authorization
The GET /api/v3/transactions/search endpoint accepts a query parameter that is passed unsanitised into a raw SQL query. No authentication is required to reach this endpoint. The parameter is vulnerable to error-based and union-based SQL injection, enabling full extraction of the underlying PostgreSQL database without credentials.
HTTP Proof of Concept — database version extraction
GET /api/v3/transactions/search?query=1'+UNION+SELECT+version(),null,null,null-- HTTP/1.1
Host: api.staging.reducted.io

# Response (truncated)
{
  "results": [
    { "id": "PostgreSQL 14.5 on x86_64-pc-linux-gnu..." }
  ]
}
Impact
An unauthenticated remote attacker can extract the complete database contents including customer PII, account numbers, transaction histories, and hashed credentials. The UNION-based vector also allows writing to the filesystem on systems with pg_read_file privileges enabled, potentially enabling remote code execution. This vulnerability constitutes a critical data breach risk and likely violates PCI-DSS Requirement 6.4 and applicable data protection obligations.
Remediation
  • Replace raw SQL concatenation with parameterised queries or prepared statements at the ORM level — no exceptions for search functionality.
  • Enforce authentication on all /api/v3/transactions/* routes immediately, regardless of SQL injection status.
  • Apply a Web Application Firewall rule to detect and block common SQLi patterns as a short-term control while remediation is in progress.
  • Conduct a full audit of all database-facing query construction across the codebase using static analysis tooling (e.g., Semgrep with the python.lang.security.audit.sqli ruleset).
PLX-002 JWT Algorithm Confusion — RS256 to HS256 Downgrade
Critical CVSS 9.1
Score9.1
Attack VectorNetwork
Attack ComplexityLow
PrivilegesLow
User InteractionNone
ConfidentialityHigh
IntegrityHigh
AvailabilityNone
OWASP API2:2023 — Broken Authentication
The authentication service accepts JWTs signed with either RS256 (asymmetric) or HS256 (symmetric) without enforcing the expected algorithm. By forging a token with the alg header set to HS256 and signing it with the server's public RSA key (which is publicly available at /auth/.well-known/jwks.json) as the HMAC secret, an attacker can forge valid-looking tokens for any user including administrators.
Python Token forging — HS256 with public key as secret
import jwt, requests

# Fetch public key from JWKS endpoint
pub_key = requests.get("https://api.staging.reducted.io/auth/.well-known/jwks.json")
                  .json()["keys"][0]["x5c"][0]

# Forge token using public key as HS256 secret
forged = jwt.encode(
    {"sub": "admin_user_id", "role": "ADMIN", "exp": 9999999999},
    pub_key,
    algorithm="HS256"
)
# Result: forged token accepted by the API as a valid admin session
Impact
Any authenticated user can forge an administrative JWT token without knowledge of the private key. The attack requires only a valid low-privilege account and access to the public JWKS endpoint. Successful exploitation grants full administrative access to the [REDACTED] control plane, including the ability to view all customer accounts, modify balances, and export the full user database.
Remediation
  • Enforce a strict allowlist of accepted algorithms on the JWT validation library — never derive the verification algorithm from the token header itself.
  • Configure the JWT library to accept only RS256 and reject all symmetric algorithms on the API server.
  • Rotate all existing signed tokens and invalidate active sessions as a precautionary measure following the fix.
  • Review the JWT library version in use — several widely-deployed libraries had this vulnerability as a default-on behaviour prior to 2022.
PLX-006 Missing Rate Limiting on OTP Verification Endpoint
High CVSS 7.5
Score7.5
Attack VectorNetwork
Attack ComplexityLow
PrivilegesNone
User InteractionNone
ConfidentialityHigh
IntegrityNone
AvailabilityNone
OWASP API4:2023 — Unrestricted Resource Consumption
The POST /api/v3/auth/verify-otp endpoint, used for two-factor authentication verification, applies no rate limiting, account lockout, or attempt throttling. A 6-digit numeric OTP has 1,000,000 possible values. During testing, 10,000 sequential requests were made against a single OTP challenge without any lockout or throttling being triggered. An OTP with a 5-minute validity window can be brute-forced within the window by an attacker with adequate network bandwidth.
Impact
An attacker with a target user's credentials (obtained through credential stuffing or phishing) can bypass two-factor authentication entirely by brute-forcing the OTP. This renders the 2FA mechanism non-functional as a security control, allowing complete account takeover of any [REDACTED] customer account.
Remediation
  • Implement a maximum of 5 failed OTP attempts per challenge, after which the OTP is invalidated and a new challenge must be initiated.
  • Apply IP-based rate limiting at the gateway level — maximum 10 requests per minute per IP to the /auth/verify-otp path.
  • Consider migrating from 6-digit numeric OTP to TOTP (RFC 6238) with a 30-second window, which is harder to brute-force within the valid window.
  • Log and alert on sequential OTP failures exceeding 3 attempts for a given account — this is an active account takeover indicator.
Findings PLX-003 through PLX-005 and PLX-007 through PLX-014 are documented in the same format in the full technical appendix delivered separately under the engagement agreement. This report presents a representative selection of the most significant findings.

05 — Business Impact

Impact assessment

The vulnerabilities identified in this assessment collectively represent a severe risk to [REDACTED]'s customer data, regulatory standing, and operational continuity. The following summarises the business-level impact categories.

Data confidentiality

Critical — Immediate Risk
PLX-001 (SQL Injection) and PLX-003 (IDOR on account data) together allow unauthenticated access to the complete customer database and individual account transaction histories. This constitutes a personal data breach under GDPR Article 33 and must be reported to the supervisory authority within 72 hours of confirmed exploitation if it occurs. PCI-DSS Requirement 3 (Protection of stored cardholder data) is violated if payment card data is stored in the affected database tables.

Authentication integrity

Critical — Full Authentication Bypass
PLX-002 (JWT algorithm confusion) and PLX-004 (mass assignment to admin role) each independently allow escalation to administrative privileges. Combined, they represent a complete failure of the authentication and authorisation control plane. Any authenticated user can reach full administrative access without additional prerequisites.

Regulatory exposure

High — Compliance Risk
The findings identified align with failures across PCI-DSS Requirement 6 (Develop and maintain secure systems), GDPR Article 25 (Data protection by design), and EBA Guidelines on ICT and security risk management. Regulatory notification obligations may be triggered depending on whether exploitation has occurred prior to this assessment.

06 — Remediation Guidance

Remediation roadmap

Remediation is the structured process of eliminating or sufficiently mitigating each identified vulnerability so that the associated risk falls within the organisation's accepted risk tolerance. This section defines what to fix, how to fix it, and who owns it — mapped to the severity tier of each finding.

Effective remediation is not a one-time event. Each fix should be implemented in a development branch, code-reviewed by a peer, deployed to staging, and verified against the original reproduction steps before being promoted to production. Plaidnox recommends scheduling a remediation verification assessment once all Critical and High findings are addressed — this is a targeted retest of the specific attack paths, not a full engagement.

Prioritisation guidance: Critical findings must be resolved before the next production deployment. High findings within 14 days. Medium and Low findings should be tracked in the security backlog with resolution within the next two sprint cycles. Informational findings should be reviewed but do not require immediate action.

Immediate actions — Critical findings (resolve before next deployment)

IDFindingRemediation ActionOwner
PLX-001 SQL Injection — Transaction Search Replace raw SQL concatenation with parameterised queries or ORM prepared statements. Add authentication middleware to all /api/v3/transactions/* routes immediately. Backend Team
PLX-002 JWT Algorithm Confusion Enforce RS256-only algorithm validation — never derive the accepted algorithm from the token header. Rotate all active sessions and revoke existing tokens post-fix. Auth Team
PLX-003 IDOR — Account Balance Add server-side ownership validation on every resource-level read and write operation. Verify that account_id in the request matches the authenticated user's identity. Backend Team
PLX-004 Mass Assignment — Admin Role Implement an explicit allowlist of accepted fields on every user-update endpoint. The role, is_admin, and privilege-related fields must be blocked from client input entirely. Backend Team

Short-term actions — High findings (resolve within 14 days)

IDFindingRemediation ActionOwner
PLX-005 Stored XSS — Profile Display Name Apply context-aware output encoding (HTML entity encoding) on all user-controlled fields rendered in an HTML context. Do not rely on input sanitisation alone — encode at render time. Frontend Team
PLX-006 No Rate Limiting — OTP Endpoint Implement a 5-attempt lockout per OTP challenge with automatic invalidation. Apply IP-level rate limiting at the API gateway — 10 requests/minute per IP to /auth/verify-otp. Auth Team
PLX-007 Sensitive Data in Error Responses Standardise all API error responses to generic, non-descriptive messages (e.g., "Request failed"). Move verbose error detail, stack traces, and internal paths to server-side logs only. Backend Team

Backlog actions — Medium findings (resolve within next 2 sprints)

IDFindingRemediation ActionOwner
PLX-008 IDOR — Document Export Validate document ownership before serving export requests. Implement indirect object references (e.g., UUIDs mapped server-side) rather than sequential integer IDs. Backend Team
PLX-009 CORS Misconfiguration Replace wildcard or dynamic origin reflection with an explicit allowlist of trusted origins. Deny credentials on cross-origin requests that do not originate from an approved domain. Infra / DevOps
PLX-010 Weak Password Policy Enforce a minimum of 12 characters with at least one uppercase, one number, and one symbol. Integrate with HaveIBeenPwned API to reject known-breached passwords at registration. Auth Team
PLX-011 Verbose Stack Traces in Production Set NODE_ENV=production (or equivalent) in all production deployments. Confirm no debug middleware or verbose error handlers are active outside of local development. Backend Team

Low priority — Low & Informational findings (track in backlog)

IDFindingRemediation ActionOwner
PLX-012 Session Token Not Invalidated on Logout Maintain a server-side token denylist or use short-lived JWTs with refresh token rotation. On logout, add the token to the denylist and clear all client-side storage. Auth Team
PLX-013 Missing HSTS Header Add Strict-Transport-Security: max-age=31536000; includeSubDomains to all API responses. Configure at the load balancer or reverse proxy level for consistency. Infra / DevOps
PLX-014 Internal IP in X-Forwarded-For Configure the reverse proxy to strip or rewrite the X-Forwarded-For header before forwarding requests downstream. Internal IP ranges must not be exposed to clients. Infra / DevOps
Verification: Once Critical and High findings are remediated, contact Plaidnox to schedule a targeted remediation verification retest. The retest will validate each fix against the original reproduction steps and issue a Remediation Verification Certificate suitable for regulatory or client disclosure.

Conclusion
The [REDACTED] API requires immediate remediation before handling production traffic
The combination of an unauthenticated SQL injection vulnerability and two independent authentication bypass conditions represents an unacceptable risk posture for a financial services platform. Production deployment should be held until all four Critical findings are resolved and independently verified. Plaidnox recommends scheduling a remediation verification assessment within 30–60 days of fix deployment. The Medium and Low findings, while lower in urgency, should be addressed within the normal security backlog cadence to progressively improve the platform's security baseline.

07 — References

References and further reading