CAPEC-89
Pharming
A pharming attack occurs when the victim is fooled into entering sensitive data into supposedly trusted locations, such as an online bank site or a trading platform. An attacker can impersonate these supposedly trusted sites and have the victim be directed to their site rather than the originally intended one. Pharming does not require script injection or clicking on malicious links for the attack to succeed.
On this page
Ask an AI about this attack pattern
Show the prompt
Explain the attack pattern CAPEC-89: Pharming: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/89.html and https://cve.bz/cve/capec/89?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
Exploit
They carry out the attack.
Attacker sets up a system mocking the one trusted by the users. This is usually a website that requires or handles sensitive information.
The attacker then poisons the resolver for the targeted site. This is achieved by poisoning the DNS server, or the local hosts file, that directs the user to the original website
When the victim requests the URL for the site, the poisoned records direct the victim to the attackers' system rather than the original one.
Because of the identical nature of the original site and the attacker controlled one, and the fact that the URL is still the original one, the victim trusts the website reached and the attacker can now "farm" sensitive information such as credentials or account numbers.
Prerequisites
Vulnerable DNS software or improperly protected hosts file or router that can be poisoned
A website that handles sensitive information but does not use a secure connection and a certificate that is valid is also prone to pharming
Skills required
- Medium skill
The attacker needs to be able to poison the resolver - DNS entries or local hosts file or router entry pointing to a trusted DNS server - in order to successfully carry out a pharming attack. Setting up a fake website, identical to the targeted one, does not require special skills.
Resources required
None: No specialized resources are required to execute this type of attack. Having knowledge of the way the target site has been structured, in order to create a fake version, is required. Poisoning the resolver requires knowledge of a vulnerability that can be exploited.
Consequences
| Impact | Affects | Note |
|---|---|---|
| Read Data | Confidentiality |
Mitigations
All sensitive information must be handled over a secure connection.
Known vulnerabilities in DNS or router software or in operating systems must be patched as soon as a fix has been released and tested.
End users must ensure that they provide sensitive information only to websites that they trust, over a secure connection with a valid certificate issued by a well-known certificate authority.
Weaknesses it exploits
- CWE-346 Origin Validation Error
- CWE-350 Reliance on Reverse DNS Resolution for a Security-Critical Action
Recent CVEs with these weaknesses
- 9.3CVE-2026-137189
Jupyter MCP Server is a Model Context Protocol server for Jupyter. Prior to 2.1.3, ManagementRouteSecurityMiddleware in jupyter_mcp_server/server.py checks request.url.hostname rather than the actual TCP peer before permitting access to /a…
- 7.5CVE-2026-102735
mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster management. Prior to version 4.0.8, the SSE transport of mcp-server-kubernetes does not validate the Host header of incoming requests, which makes it vulnerabl…
- –CVE-2026-133636
Origin validation error vulnerability in Apache Struts. The Fetch Metadata Interceptor, which is part of the default interceptor stack, did not enforce its documented resource isolation policy: some cross-site requests that the policy reje…
- 7.7CVE-2026-136630
Electerm before 5.9.0 contains an origin validation vulnerability in the MCP Server widget that allows remote attackers to execute commands by bypassing Host and Origin checks through DNS rebinding. Attackers can lure users to a page that …
- 7.6CVE-2026-136628
Wails before 2.17.1 on Linux contains an origin validation error in the sendMessageToBackend WebKitGTK handler that allows child-frame scripts to invoke the privileged IPC channel. Attackers controlling content loaded in an iframe can post…
- 2.1CVE-2026-136147
A weakness has been identified in DWS Antik Browser 1.17.0. Affected by this issue is some unknown functionality of the file src/server/index.ts of the component Local API Server. Executing a manipulation can lead to origin validation erro…
- 8.7CVE-2026-136123
Friendica through 2026.05-1 contains an improper validation vulnerability in APContact::compactProfile() that allows remote actors to overwrite a local user's stored inbox and public key by declaring that user's profile URL as their actor …
- 6.3CVE-2026-135288
AIOStreams 2.9.0 through 2.38.1 contains an information disclosure vulnerability in makeRequest() that leaks the internal secret header by matching URLs against INTERNAL_URL using a string-prefix check. Attackers can supply a custom addon …
The newest records naming one of them. Each weakness's page lists them all.
Related attack patterns
- Part of
- CAPEC-151 Identity Spoofing
Examples
An online bank website requires users to provide their customer ID and password to log on, but does not use a…
An online bank website requires users to provide their customer ID and password to log on, but does not use a secure connection.
An attacker can setup a similar fake site and leverage pharming to collect this information from unknowing victims.
MITRE's words, unchanged: CAPEC-89 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.