Download PDF
SENTINEL · www.genehack.co.jp

Example Inc.

Web Application Penetration Test
Date2026-10-19
Version1.0
Overall riskCritical
Confidential
DEMO REPORT
About this demo reportThis report was produced from a test application for demonstration purposes. All company names, data and findings are sample content; no real customer data or production systems are included.
Prepared by GeneHack inc.© 2026 · All rights reserved.

1. Executive Summary

This summary is written for both business and technical readers.

This combined assessment of Example Inc. covers both a black-box (external) and a white-box (source code) review. In total 10 findings were identified (2 critical, 6 high, 2 medium). The overall risk across both approaches is rated Critical. Findings are listed together below and detailed separately per approach.

2Critical
6High
2Medium
0Low
Findings by severity

2. Findings Overview

IDFindingSeverityStatus
F1SQL InjectionCriticalConfirmed
F2Server-Side Request Forgery (SSRF)HighConfirmed
F3Broken Access ControlHighConfirmed
F4DOM-based Cross-Site Scripting (DOM XSS)MediumConfirmed
F5SQL Injection (Authentication Bypass)CriticalConfirmed
F6NoSQL InjectionHighConfirmed
F7Insecure Direct Object Reference (IDOR)HighConfirmed
F8Broken AuthenticationHighConfirmed
F9Mass AssignmentHighConfirmed
F10Sensitive Data Exposure — Directory Listing, Backups & LogsMediumConfirmed
Part I
Black-Box Assessment
External Testing
Confidential · Example Inc.

Scope & Methodology

Test conditions

Test periodOctober 15, 2026 — October 19, 2026
EnvironmentProduction
Roles / accountsguest
user
Out of scopeDenial-of-service (DoS) testing, social engineering, and third-party services.

In scope

The assessment covered the storefront, REST API, and public site, testing both unauthenticated and authenticated (standard user) flows.

Target domains / endpoints

Endpoints: 6shop.example-inc.jp
MethodEndpoint
GET/#/administration
GET/#/search
POST/api/Feedbacks
POST/profile/image/url
GET/rest/products/search
GET/rest/user/whoami

Methodology

Without access to source code, we performed a black-box assessment from the perspective of an external attacker, aiming to manually cover the application’s functionality as comprehensively as possible. We combined automated scanning with detailed manual testing using an intercepting proxy, validating both unauthenticated and authenticated user flows.

Detailed Findings

F1

Critical SQL Injection

Target endpoint
GET https://shop.example-inc.jp/rest/products/search
CWE
CWE-89
Summary

User input is concatenated into SQL queries, allowing an attacker to alter the query structure and execute unintended queries.

Business impact

Disclosure of stored user email addresses and passwords (hashes) could lead to unauthorized account access if these credentials are subsequently decrypted or otherwise exploited. This may also result in disclosure or tampering of the entire database, potentially leading to full server takeover.

Reproduction steps
  1. Send a single quote in the q parameter and observe an error or a change in the response.
  2. Use a UNION-based payload to append columns from other tables.
  3. Confirm that database contents (such as user email addresses) are returned in the search results.
PoC (Proof of Concept)
GET /rest/products/search?q=qwert'))%20UNION%20SELECT%20id,email,password,'4','5','6','7','8','9'%20FROM%20Users-- HTTP/1.1
Host: shop.example-inc.jp
Remediation
Use parameterized queries (placeholders) or ORM bindings, and never concatenate input into SQL statements. We also recommend input validation and the use of a least-privilege database account.
F2

High Server-Side Request Forgery (SSRF)

Target endpoint
POST https://shop.example-inc.jp/profile/image/url
CWE
CWE-918
Summary

The server sends requests to user-supplied URLs without validation, allowing access to internal systems.

Business impact

This enables access to internal services and cloud metadata (which may include credentials), as well as lateral movement into the internal network.

Reproduction steps
  1. Set imageUrl to an internal or cloud-metadata URL.
  2. Send the request.
  3. The server makes an outbound request to the specified destination, confirming the SSRF.
PoC (Proof of Concept)
POST /profile/image/url HTTP/1.1
Host: shop.example-inc.jp
Cookie: token=<TOKEN>
Content-Type: application/x-www-form-urlencoded

imageUrl=http://169.254.169.254/latest/meta-data/
Remediation
Restrict destinations and schemes with an allowlist, and block private/link-local address ranges. Also validate the resolved IP address after name resolution and disable redirects.
F3

High Broken Access Control

Target endpoint
GET https://shop.example-inc.jp/#/administration
CWE
CWE-862
Summary

Operations and resources can be accessed without the required authorization checks.

Business impact

This can lead to privilege escalation and unauthorized actions or data access.

Reproduction steps
  1. Register and log in as a standard user.
  2. Navigate directly to https://shop.example-inc.jp/#/administration.
  3. Despite lacking administrator privileges, the admin panel is displayed, listing all users and feedback.
PoC (Proof of Concept)
https://shop.example-inc.jp/#/administration
Remediation
Adopt a deny-by-default design and enforce server-side authorization on every endpoint and operation.
F4

Medium DOM-based Cross-Site Scripting (DOM XSS)

Target endpoint
GET https://shop.example-inc.jp/#/search
CWE
CWE-79
Summary

Client-side JavaScript writes attacker-controllable data into a dangerous DOM API (sink).

Business impact

Scripts run in the victim’s browser, allowing session and credential theft.

Reproduction steps
  1. Open a search URL with an image-based XSS payload in the q parameter.
  2. Client-side JavaScript reads the value from location.hash and writes it to an unsafe DOM sink.
  3. The onerror handler fires, confirming script execution.
PoC (Proof of Concept)
https://shop.example-inc.jp/#/search?q=<img src=x onerror=alert(document.domain)>
Remediation
Avoid dangerous DOM APIs (sinks such as innerHTML and eval), use safe APIs such as textContent, and sanitize data before rendering.
Part II
White-Box (Source Code) Review
Source Code Analysis
Confidential · Example Inc.

Scope & Methodology

Test parameters

Testing periodOct 13, 2026 — Oct 17, 2026
Out of scopeSource code of third-party libraries and dependency packages.

Source code

SourceArchive
Archive filejuice-shop.zip
Versionv13.0.0
SHA-2560714c400584bd81d4a77cd65b9673379e8df4affd964a3d5dba141028e5dace2
Received2026-10-13
LanguagesTypeScript (52%), JavaScript (29%), SCSS (7%), HTML (6%), YAML (4%), Terraform (1%)
Volume755 files, 81 261 lines of code
Includedserver.ts
frontend/
data/
routes/
lib/
models/
views/
Excludedtest/
Review depthFull review
Focus areas
Injection
SQLiXXESSTICRLF injection
Cross-site attacks
XSS (reflected, stored, DOM)CSRFOpen redirect
Auth & access control
IDORBroken access controlAuthentication weaknessesJWT vulnerabilitiesMass assignment
Server-side
SSRFRCEPath traversalLFI / RFIFile upload
Config & exposure
Security misconfigurationSensitive data exposureInfo disclosure (stack traces, .git, backups)
Logic & modern stacks
Business logic flawsPrototype pollution

Methodology

Automated analysis of the provided source code with expert manual verification of every finding; false positives were eliminated.

Detailed Findings

F5

Critical SQL Injection (Authentication Bypass)

Affected code
routes/login.ts:34
CWE
CWE-89
Description

The login handler concatenates the submitted email address directly into the SQL statement, allowing an attacker to alter the query's logic.

Business impact

Authentication can be bypassed entirely: an attacker can log in as an administrator without valid credentials and access all customer and order data.

Root cause (code)

routes/login.ts:34 concatenates the email field as a string and does not use a parameterized query (placeholder).

Steps to reproduce
  1. Send the request below.
  2. The server returns 200 and a valid authentication token.
  3. The token can be used as Authorization: Bearer to access administrative functionality.
Proof of Concept
POST /rest/user/login HTTP/1.1
Host: shop.example-inc.jp
Content-Type: application/json

{"email":"' OR 1=1--","password":"x"}
Remediation
Use parameterized queries (placeholders) or ORM binding, and never concatenate user input into SQL statements. Also validate input and use a least-privilege database account.
F6

High NoSQL Injection

Affected code
routes/updateProductReviews.ts:17-19
CWE
CWE-943
Description

User input reaches a NoSQL query as an operator/object, changing the query semantics.

Business impact

Authentication bypass, data disclosure, and in $where contexts server-side code execution.

Root cause (code)

At routes/updateProductReviews.ts:17, { _id: req.body.id } is passed straight to update, and line 19 sets { multi: true }. Supplying an id of {"$ne":-1} matches every document, and no ownership check is performed.

Steps to reproduce
  1. Log in as an ordinary user and obtain a token.
  2. Send the request below, setting id to an operator object.
  3. Confirm that all reviews have been overwritten.
Proof of Concept
PATCH /rest/products/reviews HTTP/1.1
Host: shop.example-inc.jp
Authorization: Bearer <TOKEN>
Content-Type: application/json

{"id":{"$ne":-1},"message":"pwned"}
Remediation
Cast input to the expected type, reject objects/operators, and never build $where from user input.
F7

High Insecure Direct Object Reference (IDOR)

Affected code
routes/basket.ts:18
CWE
CWE-639
Description

An object is returned by its identifier without verifying it belongs to the current user.

Business impact

Unauthorized access to other users' data by enumerating identifiers.

Root cause (code)

routes/basket.ts retrieves the basket by the id from the URL with no ownership check (only authentication is required).

Steps to reproduce
  1. Log in as an ordinary user.
  2. Request an ID other than your own (/rest/basket/2).
  3. Another user's basket contents are returned.
Proof of Concept
GET /rest/basket/2 HTTP/1.1
Host: shop.example-inc.jp
Authorization: Bearer <TOKEN>
Remediation
Enforce object-level authorization: verify the resource owner matches the session user.
F8

High Broken Authentication

Affected code
routes/changePassword.ts:39
CWE
CWE-287
Description

Weaknesses in the authentication flow allow bypass or account takeover.

Business impact

Account takeover and unauthorized access to user functionality and data.

Root cause (code)

changePassword.ts validates the current password only inside the "if (currentPassword && ...)" branch, so validation is skipped when it is not provided.

Steps to reproduce
  1. With a valid session, send the request without the current parameter.
  2. The response confirms that the password has been changed.
  3. You can log in with the new password.
Proof of Concept
GET /rest/user/change-password?new=NewPass123&repeat=NewPass123 HTTP/1.1
Host: shop.example-inc.jp
Authorization: Bearer <TOKEN>
Remediation
Verify credentials server-side on every sensitive action, enforce MFA, and protect against CSRF.
F9

High Mass Assignment

Affected code
server.ts:382, models/user.ts:76-98
CWE
CWE-915
Description

The API binds request fields to the model without a whitelist, allowing privileged fields to be set.

Business impact

Privilege escalation (e.g. registering as an administrator) or tampering with protected attributes.

Root cause (code)

server.ts exposes POST /api/Users as a registration endpoint with no field filtering, and models/user.ts exposes role as a writable attribute whose validation permits 'admin'. As a result, a client-supplied role is accepted as-is.

Steps to reproduce
  1. As an anonymous user, send the request below with "role":"admin" in the request body.
  2. The account is created with administrator privileges.
  3. Log in with the newly created account — it has administrator privileges.
Proof of Concept
POST /api/Users HTTP/1.1
Host: shop.example-inc.jp
Content-Type: application/json

{"email":"attacker@evil.test","password":"x","role":"admin"}
Remediation
Bind only an explicit allowlist of fields; never accept role/privilege attributes from the client.
F10

Medium Sensitive Data Exposure — Directory Listing, Backups & Logs

Affected code
server.ts:288-289, server.ts:300-302, routes/logfileServer.ts:14
CWE
CWE-548
Description

Directory listing is enabled, exposing backup files and server logs that contain sensitive information. The exposure of source/configuration backups and access logs (tokens, IP addresses) significantly eases subsequent attacks.

Business impact

Exposed backup files and server logs may disclose sensitive information, including authentication tokens and source code, enabling unauthorized access and further attacks.

Root cause (code)

serveIndex is enabled on /ftp and /support/logs, and sensitive files are served by name.

Steps to reproduce
  1. Request /ftp to obtain a listing of the public directory.
  2. Request /support/logs/ to obtain a listing of the log files.
  3. Download a log file from the listing and inspect it for tokens and client IP addresses.
Proof of Concept
GET /ftp HTTP/1.1
Host: shop.example-inc.jp


GET /support/logs/ HTTP/1.1
Host: shop.example-inc.jp
Remediation
Disable directory listing, remove backups from the public area, and apply access control and rotation to logs.

3. Remediation Roadmap

Recommended remediation order, highest business risk first.

Immediate

  • F1 — SQL Injection
  • F5 — SQL Injection (Authentication Bypass)

Short term

  • F2 — Server-Side Request Forgery (SSRF)
  • F3 — Broken Access Control
  • F6 — NoSQL Injection
  • F7 — Insecure Direct Object Reference (IDOR)
  • F8 — Broken Authentication
  • F9 — Mass Assignment

Medium term

  • F4 — DOM-based Cross-Site Scripting (DOM XSS)
  • F10 — Sensitive Data Exposure — Directory Listing, Backups & Logs

4. Appendix

Approach & standards

The assessment combined external black-box testing through an intercepting proxy with a white-box review of the application source code. It references the OWASP Top 10 as a guiding framework; every finding was manually verified and reproduced with a proof-of-concept.

Disclaimer

This report is confidential and intended solely for the named client. The findings reflect the state of the application at the time of testing.
Demo report notice
This is a demonstration report generated from a test application. It contains sample information only, and no real customer or company data has been published here.