/

CVE-2016-20104

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in EyeLock nano NXT Devices

CVE-2016-20104

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthenticated Arbitrary File Disclosure

Severity:

HIGH RISK

(7.5)

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

EyeLock nano NXT devices contain a path traversal vulnerability in the log download endpoint, allowing unauthenticated attackers to request files outside the intended directory.

When the path parameter is processed without adequate validation, attackers may disclose sensitive local files if the device exposes the vulnerable endpoint.

EyeLock nano NXT devices contain a path traversal vulnerability in the log download endpoint, allowing unauthenticated attackers to request files outside the intended directory.

When the path parameter is processed without adequate validation, attackers may disclose sensitive local files if the device exposes the vulnerable endpoint.

Affected context

The vulnerability affects certain EyeLock nano NXT firmware versions where /scripts/logdownload.php accepts a user-controlled path parameter and passes it to file-reading functionality without sufficiently restricting the resolved location. Risk is higher when the endpoint is reachable over a network and does not require authentication.

The vulnerability affects certain EyeLock nano NXT firmware versions where /scripts/logdownload.php accepts a user-controlled path parameter and passes it to file-reading functionality without sufficiently restricting the resolved location. Risk is higher when the endpoint is reachable over a network and does not require authentication.

Exploit preconditions

  • Attack surface: The HTTP log download endpoint on an EyeLock nano NXT device
  • Required access: Network access to the endpoint; authentication is not required according to the vulnerability description
  • Trigger point: Processing of the path parameter in a GET request
  • Why exploitation is possible: User-supplied path values are not adequately constrained before being used to read a file, allowing traversal outside the intended directory
  • Attack surface: The HTTP log download endpoint on an EyeLock nano NXT device
  • Required access: Network access to the endpoint; authentication is not required according to the vulnerability description
  • Trigger point: Processing of the path parameter in a GET request
  • Why exploitation is possible: User-supplied path values are not adequately constrained before being used to read a file, allowing traversal outside the intended directory

Why this happens

The underlying bug is improper restriction of user-controlled filesystem paths. The application uses a request parameter to identify a file but does not reliably canonicalize the path and enforce that the resulting location remains within an approved directory.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal. The insecure pattern occurs when external input is used in filesystem operations without trusted path resolution and directory-boundary checks.

The underlying bug is improper restriction of user-controlled filesystem paths. The application uses a request parameter to identify a file but does not reliably canonicalize the path and enforce that the resulting location remains within an approved directory.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal. The insecure pattern occurs when external input is used in filesystem operations without trusted path resolution and directory-boundary checks.

Potential impact

  • Sensitive local files may be disclosed
  • Device credentials, configuration data, or logs could be exposed
  • Attackers could gather information useful for follow-on attacks
  • Privacy, operational, or compliance requirements could be affected
  • Repeated unauthorized file access could increase device compromise risk
  • Sensitive local files may be disclosed
  • Device credentials, configuration data, or logs could be exposed
  • Attackers could gather information useful for follow-on attacks
  • Privacy, operational, or compliance requirements could be affected
  • Repeated unauthorized file access could increase device compromise risk

General mitigation guidance

Mitigation generally focuses on removing direct trust in client-supplied filesystem paths and enforcing a narrow file access policy.

Common defensive patterns include:

  • Mapping approved logical file identifiers to server-side paths rather than accepting arbitrary path strings
  • Canonicalizing candidate paths and verifying that they remain within an intended directory
  • Rejecting traversal markers, absolute paths, encoded separators, and unexpected path formats as part of layered validation
  • Restricting the endpoint to necessary files and applying least-privilege permissions to the service account
  • Requiring authentication and authorization for file download functionality
  • Returning generic errors that do not reveal filesystem details
  • Isolating device services and limiting network exposure where practical

Mitigation generally focuses on removing direct trust in client-supplied filesystem paths and enforcing a narrow file access policy.

Common defensive patterns include:

  • Mapping approved logical file identifiers to server-side paths rather than accepting arbitrary path strings
  • Canonicalizing candidate paths and verifying that they remain within an intended directory
  • Rejecting traversal markers, absolute paths, encoded separators, and unexpected path formats as part of layered validation
  • Restricting the endpoint to necessary files and applying least-privilege permissions to the service account
  • Requiring authentication and authorization for file download functionality
  • Returning generic errors that do not reveal filesystem details
  • Isolating device services and limiting network exposure where practical

How teams detect issues like this

Detection can include static analysis for request parameters flowing into file APIs such as readfile() without canonicalization or directory-boundary checks. Code review should look for download handlers that concatenate user input with filesystem paths, accept arbitrary filenames, or rely only on blacklist filtering.

Runtime monitoring can flag unusual requests to file-download endpoints, traversal indicators, repeated file access failures, and responses containing sensitive system-file patterns. Web application firewalls and API policies may enforce approved path formats and restrict access to administrative download functions. Automated security review tools can help identify unsafe path handling during development.

Detection can include static analysis for request parameters flowing into file APIs such as readfile() without canonicalization or directory-boundary checks. Code review should look for download handlers that concatenate user input with filesystem paths, accept arbitrary filenames, or rely only on blacklist filtering.

Runtime monitoring can flag unusual requests to file-download endpoints, traversal indicators, repeated file access failures, and responses containing sensitive system-file patterns. Web application firewalls and API policies may enforce approved path formats and restrict access to administrative download functions. Automated security review tools can help identify unsafe path handling during development.

Sources

SourceLink
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/eyelock-nano-lfd.yaml
packetstorm.newspacketstorm.news/files/id/138274/
exploit-db.comexploit-db.com/exploits/40227
vulncheck.comvulncheck.com/advisories/eyelock-nano-nxt-3.05.1193-path-traversal-via-logdownload-php
zeroscience.mkzeroscience.mk/advisories/ZSL-2016-5356.html

Frequently asked

questions

Yes, when the affected HTTP endpoint is reachable over the network. The described issue does not require authentication, although network segmentation or access controls may limit exposure.

An attacker generally needs network connectivity to the vulnerable EyeLock nano NXT web service. No authenticated account is required according to the vulnerability description.

Avoid using raw client-provided paths for filesystem access. Use server-side identifiers, canonicalize paths, enforce an approved directory boundary, and authorize file downloads.

Apply strict input validation, least-privilege filesystem permissions, authenticated access controls, centralized path-handling utilities, and code review or automated analysis for user input reaching file APIs.

Yes, when the affected HTTP endpoint is reachable over the network. The described issue does not require authentication, although network segmentation or access controls may limit exposure.

An attacker generally needs network connectivity to the vulnerable EyeLock nano NXT web service. No authenticated account is required according to the vulnerability description.

Avoid using raw client-provided paths for filesystem access. Use server-side identifiers, canonicalize paths, enforce an approved directory boundary, and authorize file downloads.

Apply strict input validation, least-privilege filesystem permissions, authenticated access controls, centralized path-handling utilities, and code review or automated analysis for user input reaching file APIs.

Find out what's already
exploitable in your codebase.