/

CVE-2021-48014

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in FineReport 9.0 WebReport

CVE-2021-48014

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FineReport 9.0 contains a path traversal vulnerability in the unauthenticated

/WebReport/ReportServer design_save_svg operation. An attacker may use

crafted path values to write arbitrary files, potentially placing executable

server-side content and achieving remote code execution when the deployment

permits those files to be processed.

FineReport 9.0 contains a path traversal vulnerability in the unauthenticated

/WebReport/ReportServer design_save_svg operation. An attacker may use

crafted path values to write arbitrary files, potentially placing executable

server-side content and achieving remote code execution when the deployment

permits those files to be processed.

Affected context

The vulnerability occurs in FineReport 9.0 deployments that expose the

/WebReport/ReportServer endpoint and allow unauthenticated requests to reach

the design_save_svg operation. Risk is increased when user-controlled path

values are used to select filesystem locations without canonicalization,

containment checks, or restrictions on writable and executable directories.

The vulnerability occurs in FineReport 9.0 deployments that expose the

/WebReport/ReportServer endpoint and allow unauthenticated requests to reach

the design_save_svg operation. Risk is increased when user-controlled path

values are used to select filesystem locations without canonicalization,

containment checks, or restrictions on writable and executable directories.

Exploit preconditions

  • Attack surface: The FineReport WebReport HTTP service and its

design_save_svg operation

  • Required access: Network reachability to the endpoint; authentication may

not be required

  • Trigger point: Processing a request containing a user-controlled

filePath value and file content

  • Why exploitation is possible: The application may interpret traversal

sequences as filesystem navigation and write data outside the intended

directory

  • Attack surface: The FineReport WebReport HTTP service and its

design_save_svg operation

  • Required access: Network reachability to the endpoint; authentication may

not be required

  • Trigger point: Processing a request containing a user-controlled

filePath value and file content

  • Why exploitation is possible: The application may interpret traversal

sequences as filesystem navigation and write data outside the intended

directory

Why this happens

The underlying bug is insufficient validation of a user-controlled filesystem

path. When path values are concatenated or resolved without canonicalization,

traversal elements can escape the intended storage directory. This maps to

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). If the resulting location is web-accessible or processed

as executable content, an arbitrary file write can become a code-execution

pathway.

The underlying bug is insufficient validation of a user-controlled filesystem

path. When path values are concatenated or resolved without canonicalization,

traversal elements can escape the intended storage directory. This maps to

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). If the resulting location is web-accessible or processed

as executable content, an arbitrary file write can become a code-execution

pathway.

Potential impact

  • An attacker may overwrite or create files outside the intended upload area.
  • The application may be forced to serve attacker-controlled content.
  • The attacker could achieve remote code execution under the service account.
  • Sensitive application data or configuration could be modified or exposed.
  • The host and connected systems could face follow-on compromise.
  • An attacker may overwrite or create files outside the intended upload area.
  • The application may be forced to serve attacker-controlled content.
  • The attacker could achieve remote code execution under the service account.
  • Sensitive application data or configuration could be modified or exposed.
  • The host and connected systems could face follow-on compromise.

General mitigation guidance

Mitigation generally focuses on removing filesystem trust from request

parameters and limiting the consequences of any permitted file writes.

Common defensive patterns include:

  • Resolve paths canonically and verify that the result remains within a fixed,

dedicated storage directory.

  • Prefer server-generated identifiers and allowlisted file names over

caller-supplied paths.

  • Reject traversal syntax, absolute paths, unexpected encodings, and

filesystem separators as a defense-in-depth measure.

  • Store user-controlled files outside web roots and executable locations.
  • Apply strict permissions so the service account cannot modify application

code or sensitive system paths.

  • Require authentication and authorization for file-writing operations where

anonymous access is not essential.

  • Use isolated storage and non-executable mounts when feasible.

Mitigation generally focuses on removing filesystem trust from request

parameters and limiting the consequences of any permitted file writes.

Common defensive patterns include:

  • Resolve paths canonically and verify that the result remains within a fixed,

dedicated storage directory.

  • Prefer server-generated identifiers and allowlisted file names over

caller-supplied paths.

  • Reject traversal syntax, absolute paths, unexpected encodings, and

filesystem separators as a defense-in-depth measure.

  • Store user-controlled files outside web roots and executable locations.
  • Apply strict permissions so the service account cannot modify application

code or sensitive system paths.

  • Require authentication and authorization for file-writing operations where

anonymous access is not essential.

  • Use isolated storage and non-executable mounts when feasible.

How teams detect issues like this

High-level detection can combine application review, runtime monitoring, and

policy enforcement:

  • Use static analysis to identify request parameters flowing into file APIs

without canonicalization and directory-containment checks.

  • Review code and configuration for file-writing endpoints that accept paths,

filenames, or upload destinations from clients.

  • Monitor web and application logs for traversal indicators, unusual file

creation, unexpected extensions, and requests to design_save_svg.

  • Alert on modifications within web roots, application directories, and other

normally immutable locations.

  • Enforce policies requiring authentication, path allowlists, and dedicated

non-executable storage for upload functionality.

  • Automated code review and software composition tools may help identify

related path-handling patterns.

High-level detection can combine application review, runtime monitoring, and

policy enforcement:

  • Use static analysis to identify request parameters flowing into file APIs

without canonicalization and directory-containment checks.

  • Review code and configuration for file-writing endpoints that accept paths,

filenames, or upload destinations from clients.

  • Monitor web and application logs for traversal indicators, unusual file

creation, unexpected extensions, and requests to design_save_svg.

  • Alert on modifications within web roots, application directories, and other

normally immutable locations.

  • Enforce policies requiring authentication, path allowlists, and dedicated

non-executable storage for upload functionality.

  • Automated code review and software composition tools may help identify

related path-handling patterns.

Sources

SourceLink
github.comgithub.com/NHPT/WebReportV9Exp/blob/main/WebReport_Exp.py
github.comgithub.com/PeiQi0/PeiQi-WIKI-Book/blob/main/docs/wiki/oa/%E5%B8%86%E8%BD%AFOA/%E5%B8%86%E8%BD%AF%E6%8A%A5%E8%A1%A8%20V9%20design_save_svg%20%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%A6%86%E7%9B%96%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0.md
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/finereport/fine-report-v9-file-upload.yaml
fanruan.comfanruan.com/en/finereport
vulncheck.comvulncheck.com/advisories/finereport-9.0-unauthenticated-path-traversal-file-write-via-reportserver

Frequently asked

questions

Yes, when the affected WebReport endpoint is network-accessible and permits

unauthenticated requests. The practical scope depends on exposure and

filesystem permissions.

The attacker generally needs network access to the FineReport service. The

vulnerable operation is described as unauthenticated, so valid application

credentials may not be necessary.

Do not use client-controlled paths for filesystem writes. Use server-generated

names, canonicalize and contain any necessary paths, and keep writable content

outside executable or web-served directories.

Combine strict input and authorization checks with least-privilege service

accounts, non-executable storage, code review for filesystem sinks, and

monitoring for unexpected file creation.

Yes, when the affected WebReport endpoint is network-accessible and permits

unauthenticated requests. The practical scope depends on exposure and

filesystem permissions.

The attacker generally needs network access to the FineReport service. The

vulnerable operation is described as unauthenticated, so valid application

credentials may not be necessary.

Do not use client-controlled paths for filesystem writes. Use server-generated

names, canonicalize and contain any necessary paths, and keep writable content

outside executable or web-served directories.

Combine strict input and authorization checks with least-privilege service

accounts, non-executable storage, code review for filesystem sinks, and

monitoring for unexpected file creation.

Find out what's already
exploitable in your codebase.