cve.bz

CAPEC-159

Redirect Access to Libraries

Very High severityHigh likelihoodStandard pattern

An adversary exploits a weakness in the way an application searches for external libraries to manipulate the execution flow to point to an adversary supplied library or code base. This pattern of attack allows the adversary to compromise the application or server via the execution of unauthorized code. An application typically makes calls to functions that are a part of libraries external to the application. These libraries may be part of the operating system or they may be third party libraries. If an adversary can redirect an application's attempts to access these libraries to other libraries that the adversary supplies, the adversary will be able to force the targeted application to execute arbitrary code. This is especially dangerous if the targeted application has enhanced privileges. Access can be redirected through a number of techniques, including the use of symbolic links, search path modification, and relative path manipulation.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-159: Redirect Access to Libraries: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/159.html and https://cve.bz/cve/capec/159?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 Target] The adversary identifies the target application and determines what libraries are being used.

      2 techniques
      • Find public source code and identify library dependencies.
      • Gain access to the system hosting the application and look for libraries in common locations.
  2. Experiment

    They probe what they found.

    1. [Deploy Malicious Libraries] The adversary crafts malicious libraries and deploys them on the system where the application is running, or in a remote location that can be loaded by the application.

  3. Exploit

    They carry out the attack.

    1. [Redirect Library Calls to Malicious Library] Once the malicious library crafted by the adversary is deployed, the adversary will manipulate the flow of the application such that it calls the malicious library. This can be done in a variety of ways based on how the application is loading and calling libraries.

      3 techniques
      • Poison the DNS cache of the system so that it loads a malicious library from a remote location hosted by the adversary instead of the legitimate location
      • Create a symlink that tricks the application into thinking that a malicious library is the legitimate library.
      • Use DLL side-loading to place a malicious verison of a DLL in the windows directory.

Prerequisites

  • The target must utilize external libraries and must fail to verify the integrity of these libraries before using them.

Skills required

  • Low skill

    To modify the entries in the configuration file pointing to malicious libraries

  • Medium skill

    To force symlink and timing issues for redirecting access to libraries

  • High skill

    To reverse engineering the libraries and inject malicious code into the libraries

Consequences

What a successful attack can lead to
ImpactAffectsNote
Execute Unauthorized CommandsAuthorizationRun Arbitrary Code
Bypass Protection MechanismAccess Control, Authorization

Mitigations

  • Implementation: Restrict the permission to modify the entries in the configuration file.

  • Implementation: Check the integrity of the dynamically linked libraries before use them.

  • Implementation: Use obfuscation and other techniques to prevent reverse engineering the libraries.

Weaknesses it exploits

  • CWE-706 Use of Incorrectly-Resolved Name or Reference

Recent CVEs with these weaknesses

  1. 7.5CVE-2026-135616

    The W3 Total Cache plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 2.11.0 via deserialization of untrusted input that is injected into the Memcached object cache through request Host header …

  2. 7.5CVE-2026-136506

    psqlODBC builds queries of its own from names, and put these names into them without escaping or qualification: - the database name in SQLForeignKeys(); - the current schema name in catalog functions; - the table name in the currtid2() ca…

  3. 8.1CVE-2026-136502

    psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran…

  4. 7.1CVE-2026-136501

    To build positioned updates and to describe columns, psqlODBC matches the names in a statement against the catalog. Where it matched differently from the server, it used another table or column: - Table and schema names were compared case…

  5. 7.0CVE-2026-136862

    In Eclipse Apoapsis ORT Server Credential Helper versions 0.1.0 to 0.2.0, as shipped with Eclipse Apoapsis ORT Server versions 0.65.0 to 0.83.0, the Git credential helper selects stored credentials by re-parsing the requested URL with a re…

  6. 7.5CVE-2026-131255

    In Splunk SOAR versions below 8.8.0, an unauthenticated user could gain administrator privileges through a user account that receives an unintended role. A user that holds a role with permission to create or modify users and assign roles m…

  7. 4.7CVE-2026-130954

    Incorrect reference resolution in ANGLE in Google Chrome prior to 158.0.8127.36 allowed a remote attacker to read memory outside the sandbox via a crafted HTML page. (Chromium security severity: High)

  8. 8.1CVE-2026-130913

    Incorrect reference resolution in Mobile in Google Chrome on on Android prior to 158.0.8127.36 allowed a remote attacker leveraging social engineering to bypass web origin policy via a crafted HTML page. (Chromium security severity: Medium)

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

Part of
Can lead to
More specific patterns

Examples

In this example, the attacker using ELF infection that redirects the Procedure Linkage Table (PLT) of an exec…

In this example, the attacker using ELF infection that redirects the Procedure Linkage Table (PLT) of an executable allowing redirection to be resident outside of the infected executable. The algorithm at the entry point code is as follows... • mark the text segment writeable • save the PLT(GOT) entry • replace the PLT(GOT) entry with the address of the new lib call The algorithm in the new library call is as follows... • do the payload of the new lib call • restore the original PLT(GOT) entry • call the lib call • save the PLT(GOT) entry again (if its changed) • replace the PLT(GOT) entry with the address of the new lib call

MITRE's words, unchanged: CAPEC-159 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.