cve.bz

CAPEC-48

Passing Local Filenames to Functions That Expect a URL

High severityHigh likelihoodStandard pattern

This attack relies on client side code to access local files and resources instead of URLs. When the client browser is expecting a URL string, but instead receives a request for a local file, that execution is likely to occur in the browser process space with the browser's authority to local files. The attacker can send the results of this request to the local files out to a site that they control. This attack may be used to steal sensitive authentication data (either local or remote), or to gain system profile information to launch further attacks.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-48: Passing Local Filenames to Functions That Expect a URL: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/48.html and https://cve.bz/cve/capec/48?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Identify web application URL inputs] Review application inputs to find those that are designed to be URLs.

      2 techniques
      • Manually navigate web site pages to identify URLs.
      • Use automated tools to identify URLs.
  2. Experiment

    They probe what they found.

    1. [Identify URL inputs allowing local access.] Execute test local commands via each URL input to determine which are successful.

      2 techniques
      • Manually execute a local command (such as 'pwd') via the URL inputs.
      • Using an automated tool, test each URL input for weakness.
  3. Exploit

    They carry out the attack.

    1. [Execute malicious commands] Using the identified URL inputs that allow local command execution, execute malicious commands.

      1 technique
      • Execute local commands via the URL input.

Prerequisites

  • The victim's software must not differentiate between the location and type of reference passed the client software, e.g. browser

Skills required

  • Medium skill

    Attacker identifies known local files to exploit

Consequences

What a successful attack can lead to
ImpactAffectsNote
Read DataConfidentiality
Modify DataIntegrity

Mitigations

  • Implementation: Ensure all content that is delivered to client is sanitized against an acceptable content specification.

  • Implementation: Ensure all configuration files and resource are either removed or protected when promoting code into production.

  • Design: Use browser technologies that do not allow client side scripting.

  • Implementation: Perform input validation for all remote content.

  • Implementation: Perform output validation for all remote content.

  • Implementation: Disable scripting languages such as JavaScript in browser

Weaknesses it exploits

  • CWE-241 Improper Handling of Unexpected Data Type
  • CWE-706 Use of Incorrectly-Resolved Name or Reference

Recent CVEs with these weaknesses

  1. 6.5CVE-2026-18484

    IBM ContextForge MCP Gateway 1.0.0 through 1.0.11 could allow a remote authenticated attacker to cause a denial of service due to improper slug normalization causing tool name collisions.

  2. 9.6CVE-2026-121200

    Incorrect reference resolution in DevTools in Google Chrome prior to 157.0.8103.38 allowed a remote attacker leveraging social engineering to potentially execute arbitrary code outside the sandbox via a crafted HTML page. (Chromium securit…

  3. 8.1CVE-2026-121133

    Incorrect reference resolution in Images in Google Chrome on on Mac prior to 157.0.8103.38 allowed a remote attacker who had compromised the renderer process to execute arbitrary code outside the sandbox via crafted network traffic. (Chrom…

  4. 5.2CVE-2026-119675

    MongoDB Database Tools mongorestore inconsistently handles the system.buckets. prefix when validating collection names in an untrusted dump. A specially crafted collection name can bypass special-collection guards and operator namespace fi…

  5. 8.8CVE-2026-118938

    In Trail of Bits fickling through 0.1.12, a pickle STACK_GLOBAL operand carrying a dotted __qualname__ (for example "Values.read_file") is resolved by pickle's find_class through _getattribute to an arbitrary attribute path rather than to …

  6. 8.8CVE-2026-119270

    Incorrect reference resolution in CacheStorage in Google Chrome prior to 156.0.8078.79 allowed a remote attacker who had compromised the renderer process to obtain sensitive information via a crafted HTML page. (Chromium security severity:…

  7. 8.8CVE-2026-119266

    Incorrect reference resolution in Quota in Google Chrome prior to 156.0.8078.79 allowed a remote attacker who had compromised the renderer process to potentially execute arbitrary code outside the sandbox via a crafted HTML page. (Chromium…

  8. 8.8CVE-2026-119265

    Incorrect reference resolution in Quota in Google Chrome prior to 156.0.8078.79 allowed a remote attacker who had compromised the renderer process to execute arbitrary code outside the sandbox via crafted network traffic. (Chromium securit…

The newest records naming one of them. Each weakness's page lists them all.

Part of

Examples

J2EE applications frequently use .properties files to store configuration information including JDBC connecti…

J2EE applications frequently use .properties files to store configuration information including JDBC connections, LDAP connection strings, proxy information, system passwords and other system metadata that is valuable to attackers looking to probe the system or bypass policy enforcement points. When these files are stored in publicly accessible directories and are allowed to be read by the public user, then an attacker can list the directory identify a .properties file and simply load its contents in the browser listing its contents. A standard Hibernate properties file contains

hibernate.connection.driver_class = org.postgresql.Driver
hibernate.connection.url = jdbc:postgresql://localhost/mydatabase
hibernate.connection.username = username
hibernate.connection.password = password
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20

Even if the attacker cannot write this file, there is plenty of information to leverage to gain further access.

MITRE's words, unchanged: CAPEC-48 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.