Generic advice like "use HTTPS and a firewall" is no longer enough. Attackers operate within encrypted traffic and around traditional perimeter defenses. This article maps the attack vectors actively targeting websites in 2026, ranked by frequency and damage, with the specific defenses that actually counter each.

1. Credential stuffing and brute force

Automated bots run leaked credentials from previous breaches against login forms. Major auth providers logged billions of stuffing attempts in 2024 alone.

How it works: a botnet rotates IPs and User-Agents while testing username/password pairs from leak databases. Successful logins are sold or used for follow-up attacks (account takeover, fraud, spam).

Defense priority:

  • Rate-limit login endpoints aggressively (e.g. 5 attempts / 15 min per IP, exponential backoff).
  • Mandatory MFA for any account holding payment data, admin rights, or PII.
  • Use the Have I Been Pwned password API to reject known-leaked passwords at signup.
  • Add a CAPTCHA or proof-of-work challenge after the second failed attempt.

2. Supply-chain attacks (npm, composer, pip)

Compromised packages have become the favored vector against modern web apps. A typosquat or maintainer-account takeover lets an attacker inject code into thousands of downstream sites.

How it works: attacker pushes a new minor version of a popular package containing exfiltration code. Auto-updates spread it through CI/CD pipelines silently.

Defense priority:

  • Lock dependencies (package-lock.json, composer.lock) and review every diff in PRs.
  • Use a Software Bill of Materials (SBOM) tool to know what's in production.
  • Enable dependency vulnerability scanning (Dependabot, Snyk, or equivalent).
  • Pin transitive dependencies for high-risk packages (auth, crypto, payment SDKs).

3. SQL injection (still alive)

SQLi remains in OWASP's top risks because legacy code and ORM misuse keep producing new vulnerabilities every year.

How it works: attacker injects SQL fragments via unsanitized inputs (URL params, form fields, headers). Used to exfiltrate data, modify records, or escalate to RCE.

Defense priority:

  • Parameterized queries / prepared statements only — never string concatenation.
  • ORM with strict mode enabled, no raw queries unless mandatory and reviewed.
  • Database-level least-privilege accounts (the web user shouldn't have DROP).
  • WAF as a backstop, not a primary defense.

4. Cross-site scripting (XSS)

XSS gets less press than it deserves. It's the entry point for session hijacking, credential phishing, and crypto-wallet drainers in 2026.

Defense priority:

  • Strict Content Security Policy (CSP) header — forbid inline scripts and external sources except a trusted allowlist.
  • Output encoding at every render point. Use framework primitives that escape by default (React JSX, Vue templates).
  • Sanitize Markdown/HTML user input through a hardened library (DOMPurify, HTML Purifier).
  • HttpOnly + Secure + SameSite=Strict on session cookies to limit XSS impact.

5. AI-assisted phishing on contact forms

New in 2026's threat landscape: attackers use LLMs to craft contextually convincing replies through public contact forms, often impersonating legal or partner entities to extract credentials, payments, or sensitive replies from your team.

Defense priority:

  • Server-side honeypot fields invisible to humans — bots fill them, you reject the submission.
  • Rate-limit form submissions per IP and per email.
  • Verify reply-to addresses match domains you've previously communicated with before exposing internal info.
  • Train staff to recognize urgency-based social engineering, even when grammar is perfect.

6. Subdomain takeover

An old subdomain pointed at a deprovisioned service (S3 bucket, Heroku app, GitHub Pages) is a free entry into your brand for any attacker who claims the dangling resource.

Defense priority:

  • Inventory DNS records quarterly. Remove CNAMEs to services no longer in use.
  • Monitor public certificate transparency logs for new certs issued for your subdomains.

Threat priority matrix

ThreatFrequencyTypical impactDetection difficulty
Credential stuffingConstantAccount takeoverLow (logs visible)
Supply chainRare-mediumCritical (full app)Very high
SQL injectionMediumData breachMedium
XSSConstantSession theftMedium
AI phishingGrowingTargeted fraudHigh (no signature)
Subdomain takeoverRareBrand damageHigh

If you need a hardened hosting setup with managed firewall rules, automatic security updates, and Let's Encrypt SSL out of the box, our hosting infrastructure includes these defenses by default.