Cyber Security SpaceCYBERSECURITYSPACE.NET
Community
Community HubEventsNewsletterSubmit a Tool
Careers
JobsCareer GuidesFor ProfessionalsCertifications
Learn
Learning PathsEducationGuidesGlossaryTools
News & Threats
NewsBlogThreat LibraryCrypto Security
Small Business
Security CheckupSecurity GuidesComplianceIncident ResponseSecurity Monitor
Join the community
Cyber Security Space

A community for cybersecurity professionals and enthusiasts: careers, learning, and people to learn with. Practical guidance for small businesses too.

Small Business

  • Security Checkup
  • Security Checklist
  • Security Guides
  • Templates
  • Security Tools

Security

  • Website Security
  • Incident Response
  • Compliance
  • Threat Library
  • Crypto Security

Resources

  • Resources
  • News
  • Blog
  • Glossary
  • Jobs
  • Learning

Company

  • About
  • Sources
  • Contact
  • Privacy Policy
  • Terms
  • Disclaimer
  • Editorial Policy
© 2026 Cyber Security Spacecybersecurityspace.net

Blog

Hidden Link Injection

Attackers hide outbound links in your templates and content to pass authority to their own sites. Where the links hide, how to find them, and how to remove them safely.

Published 18 Jun 2026 · Updated 20 Aug 2026 · 2 min read

Short answer

Hidden link injection is an attack in which spam outbound links are added to a website and then made invisible to human visitors — through CSS, zero-size elements or off-screen positioning — so that search engines still count the links while the site owner does not notice them.

How do hidden links get injected into a website?

Injection needs write access somewhere in the rendering path. In practice that means a vulnerable plugin, a compromised administrator account, a writable theme directory, or a stored cross-site scripting flaw that lets untrusted input reach a template. Once inside, the attacker appends markup to whatever renders on every page — most often a footer include, a widget, or a header hook.

Hiding techniqueWhat it looks like in sourceHow to spot it
CSS display or visibilitydisplay:none, visibility:hidden on a link containerCompare rendered text with source text; query the DOM for hidden anchors
Off-screen positioningposition:absolute with a large negative offsetLook for anchors whose bounding box sits outside the viewport
Zero-size or transparent textfont-size:0, colour matching the background, 1px containersAudit computed styles of anchor elements
Crawler-only outputLinks present only for search-engine user agentsFetch the page with a crawler user agent and diff the HTML

How do you know if your site has hidden links?

  1. STEP 01

    Count outbound domains

    Extract every external link from your key templates and compare against the domains you intentionally link to. Anything unexplained is a candidate.

  2. STEP 02

    Diff rendered text against source

    Anchor text that exists in the HTML but never appears on screen is the definition of a hidden link.

  3. STEP 03

    Check computed styles

    Inspect anchors for zero dimensions, hidden visibility, transparent colour, or extreme offsets.

  4. STEP 04

    Search stored content

    Query post bodies, options tables and cached fragments for the offending domains and for suspicious inline style attributes.

How do you remove hidden links?

  1. Record every injected URL and its location before deleting anything.
  2. Remove the markup from templates, then reinstall the affected theme or plugin from source to catch what you missed.
  3. Clean stored content in the database, including revisions and cached fragments.
  4. Purge every caching layer, including any CDN.
  5. Rotate administrator and hosting credentials and review user accounts.
  6. Re-scan after 24 hours; a reappearance means an active backdoor remains.
If the injected links pointed at malware or phishing destinations, treat the incident as a full compromise, not a content problem.

How do you prevent hidden link injection?

  • Deny write access to theme and plugin directories in production.
  • Track file integrity so template changes generate an alert.
  • Add a Content Security Policy to limit what injected markup can load.
  • Review installed plugins quarterly and remove anything unmaintained.

Sources

  • Link spam policies — Google Search Central
  • Content Security Policy — MDN Web Docs

Prefer summary updates? Subscribe to the newsletter.

On this page

  • How do hidden links get injected into a website?
  • How do you know if your site has hidden links?
  • How do you remove hidden links?
  • How do you prevent hidden link injection?