Zum Hauptinhalt springen
Support
0
Kontaktieren Sie uns
English
Nederlands
Español
Dedicated ServersFlexible VPSCloud-TechnologieColocationHerausforderungen in der ITSektorenCareers
Cloud Compute

Mit Cloud Compute haben Sie jederzeit und überall Zugriff auf ein Portal, über das Sie Ihre gesamte IT-Umgebung konfigurieren können – egal wo auf der Welt Sie sich befinden.

Cloud-Speicher

Zuverlässiger Zugriff auf Ihre Dateien, Infrastruktur und Anwendungen zu jeder Zeit – ganz ohne Unterbrechungen oder Verzögerungen. Bei Worldstream bieten wir eine Vielzahl von Speicherlösungen an.

Flexible cloud icon
Flexible Cloud
Private cloud icon
Private Cloud
Bare metal icon
Bare Metal Compute
Hollow cube icon
Objektspeicher
Hollow cube icon
Dateiablage
Block storage icon
Blockspeicher
Backup storage icon
Sicherungsspeicher
Brauchen Sie Unterstützung?

Mit erfahrenen Technikern und einer durchschnittlichen Reaktionszeit von 7 Minuten erhalten Sie innerhalb kürzester Zeit eine solide technische Supportlösung.

Dedicated Server

Wählen Sie jetzt Ihren Dedicated Server. Individuelle oder Instant Delivery. Leistungsstarke Server, die perfekt zu Ihrem Anwendungsfall passen.

Use Cases

Ganz gleich, welcher Use Case – wir helfen Ihnen, die ideale Lösung zu finden.

Deal servers icon
Deals
AMD servers icon
AMD-Prozessoren
AI servers icon
Intel-Prozessoren
Hollow cube icon
Virtualisierung, Containerisierung & Orchestrierung
Hollow cube icon
Websites & Applications
Hollow cube icon
Gaming & Streaming Infrastruktur
Brauchen Sie Unterstützung?

Mit erfahrenen Technikern und einer durchschnittlichen Reaktionszeit von 7 Minuten erhalten Sie innerhalb kürzester Zeit eine solide technische Supportlösung.

Smartes Outsourcing

Bestimmte IT-Lösungen generieren Mehrwert, andere erfüllen eher eine unterstützende Funktion. Denken Sie beim Outsourcing daran.

Kosteneffizienz

IT-Komplettpakete mögen erstmal wie eine sichere Option erscheinen, doch wenn man sich die Kosten genau anschaut, sind andere Lösungen oft sinnvoller.

IT-Flexibilität und Kontrolle

Outsourcing heißt nicht, dass man die Kontrolle verliert; man bekommt sogar mehr Flexibilität und Kontrolle.

Cloud-Repatriierung

Die Cloud ist kein Endziel: Sie sollten Ihre Cloud-Umgebung kontinuierlich prüfen und an die sich ändernden Anforderungen anpassen.

Finanzdienstleistungen
Logistik und Transport
Einzelhandel und E-commerce
Medien und Unterhaltung
Technik und Softwareentwicklung
Sicherheit
Managed Service Provider
Brauchen Sie Unterstützung?

Mit erfahrenen Technikern und einer durchschnittlichen Reaktionszeit von 7 Minuten erhalten Sie innerhalb kürzester Zeit eine solide technische Supportlösung.

Chatten Sie mit unsKontaktieren Sie uns
Über WorldstreamÜber die TechnologieKundenfälleWissensdatenbank
Über unsLernen Sie unser Team kennenJobsWerden Sie WiederverkäuferZertifizierungenUnsere RechenzentrenUnser NetzwerkDDoS-SchutzAMD EPYC-ServerTechnologiepartnerBetriebssystemeAlle KundenfälleEasyTerraDutch Drone CompanyPerfGridArtikelFAQNachrichten und BlogbeiträgeProdukte und Services
Kontaktieren Sie uns

Rufen Sie an unter +31 (0) 174 – 712 117 Industriestraat 53, Naaldwijk

English
Nederlands
Español
0
Dedicated ServersFlexible VPSCloud-TechnologieColocationHerausforderungen in der ITSektorenCareersÜber WorldstreamÜber die TechnologieKundenfälleWissensdatenbankMy Worldstream
Contact
Support
EnglishNederlandsEspañol
  1. HomeHome
  2. Knowledge Base
  3. Security
  4. What is SQL injection, and how to protect against it

What is SQL injection, and how to protect against it

Gilt für Any application backed by a SQL databaseZielgruppe Developer, technical evaluatorZuletzt geprüft September 2026

Kort antwoord

SQL injection happens when untrusted input gets pasted directly into a database query as text, letting an attacker change what the query actually does. The standard defence is a parameterised query (also called a prepared statement), which keeps user input as data rather than letting it become part of the query's structure. It's available in essentially every modern database library, and it's the real fix, not just one layer among several.

Auf dieser Seite
  • How SQL injection actually happens
  • A simple illustrative example
  • The real fix: parameterised queries
  • Additional layers, not substitutes

How SQL injection actually happens

A SQL injection vulnerability starts with untrusted input, anything a user can control such as a form field, a URL parameter, or a cookie value, being concatenated directly into a database query as plain text. The application builds the query by joining strings together, sends the result to the database, and the database has no way to tell the difference between "the query the developer intended" and "the query as it now reads after the input was inserted". If that input contains SQL syntax of its own, it can change the meaning of the query entirely. An attacker who finds this can potentially read data they shouldn't see, modify records, or delete them, all through a field that was only ever meant to hold something like a username or a search term.

A simple illustrative example

Imagine a login check that builds its query like this, in plain terms: it takes the username typed into the form and inserts it directly into a string that reads something like "find the user where the username equals" whatever was typed. If a legitimate user types alice, the query ends up asking for the user named alice, which is exactly what was intended. But because the username was inserted as raw text, an attacker can type something that isn't a username at all, a fragment of SQL syntax designed to alter the query's logic, for example something that makes the "where" condition always evaluate as true regardless of what username was expected. The database doesn't see "an unusual username", it sees a modified query, and executes it as written.

Now compare that with a login check that uses a parameterised placeholder for the username instead. The query's structure, "find the user where the username equals a placeholder", is fixed and sent to the database first. The typed username is then supplied separately, as a value to slot into that placeholder, never as text that gets merged into the query itself. Whatever the attacker types is treated purely as the value being searched for, even if it contains characters that would have been dangerous in the concatenated version. The query's logic simply cannot be changed by what arrives in that field, because the database keeps the query's structure and the query's data in two separate channels from the start.

The real fix: parameterised queries

Parameterised queries, also known as prepared statements, are the standard defence, not an optional extra. They work by sending the query's structure to the database separately from the values that fill it in, so user input is always treated as data and never as part of the query's syntax, no matter what characters it contains. This isn't a niche feature: essentially every modern database library and ORM, across essentially every programming language, supports parameterised queries as a normal, idiomatic way to write a query. If a codebase is building queries by concatenating strings with user input anywhere, that's the specific pattern worth finding and replacing.

Additional layers, not substitutes

Parameterised queries are the fix for the injection mechanism itself, but two other practices are worth layering on top, as defence in depth rather than as alternatives:

  • Input validation. Checking that input looks like what it's supposed to be, an email field looks like an email, a numeric ID is actually numeric, catches malformed input early. It's a useful additional check, but it's not a substitute for parameterised queries, since validation logic can be incomplete or bypassed in ways a database driver's own parameter handling won't be.
  • Least-privilege database accounts. The database account an application connects with should only have the permissions that application actually needs. If a web application only ever needs to read and write specific tables, its database credentials shouldn't also carry permission to drop tables or read unrelated ones. This limits the damage if an injection flaw, or any other compromise, does happen, without preventing the flaw itself.

Both are worth doing. Neither replaces fixing the actual query-building pattern that lets injection happen in the first place.

Related articles

  • What is a Web Application Firewall (WAF), and how it differs from a network firewall
  • Hardening a fresh VPS: SSH keys, firewall and Fail2ban
War dieser Artikel hilfreich?

Solide IT. Keine Überraschungen

Sparringspartner für IT-Reife
Wir räumen die Hindernisse aus dem Weg, damit Sie freie Bahn haben
Vorhersehbare und transparente Kosten

Kontakt

  • Industriestraat 53, Naaldwijk
  • Zahlungsmöglichkeiten
  • Missbrauch
  • Ressourcen für Entwickler
  • Network Operations Center
  • Über uns
  • Lernen Sie unser Team kennen
  • Jobs
  • Werden Sie Wiederverkäufer
  • Zertifizierungen
  • Unsere Rechenzentren
  • Unser Netzwerk
  • DDoS-Schutz
  • AMD EPYC-Server
  • Technologiepartner
  • Betriebssysteme
  • Übersicht
  • FAQ
  • Kundenfälle
  • Nachrichten und Blogbeiträge
  • Use Cases
English
Nederlands
Español
English
Nederlands
Español
  • Rechtliches
  • Transparenzhinweis