A modern, comprehensive resource for SQL injection techniques, examples, and bypasses across multiple database platforms.
Read it at websec.ca/sql-injection-knowledge-base, its official home.
The SQL Injection Knowledge Base is a comprehensive resource designed to help security professionals and developers understand, identify, and test SQL injection vulnerabilities across various database systems. Serving both as an educational tool and practical reference, it supports continuous learning and effective vulnerability assessment.
This project is a modern rebuild of the original SQLi Knowledge Base, featuring improved performance, enhanced accessibility, better user experience, and increased extensibility to encourage community contributions.
- Comprehensive Coverage: Techniques for MySQL, MariaDB, MSSQL, Oracle, and PostgreSQL databases
- User-Friendly Navigation: Organized by database type and technique categories
- Modern Interface: Fast, responsive design that works across all devices
- Searchable Content: Quick access to specific techniques
- Code Examples: Practical examples for each technique
- Open Source: Community-driven knowledge base
Built with:
- Astro - A modern static site generator focused on performance
- Markdown for content management
- Modern JavaScript for interactive features
- Responsive design for all device sizes
- Node.js 24.0.0 or later (24.x LTS recommended and tested)
- npm (bundled with Node.js; no separate installation required)
-
Clone the repository:
git clone https://github.com/WebsecLabs/sql-injection-knowledge-base.git cd sql-injection-knowledge-base -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Build for production:
npm run build
-
Check types:
npm run typecheck
This runs
astro checkon TypeScript 6, which covers the.astrofiles, then the TypeScript 7 compiler on the.tsfiles.astro checkand typescript-eslint do not support TypeScript 7 yet, so thetypescriptpackage name points at TypeScript 6 through@typescript/typescript6, and TypeScript 7 is installed astypescript-7.
The build output in dist/ is a fully static site. Choose a build mode first:
npm run buildserves the site under/sql-injection-knowledge-base/, as on websec.ca.STANDALONE=true SITE_URL=https://your.domain npm run build:standaloneserves it at the root of your domain.
npm run build
docker build -t sqli-kb .
docker run -d -p 8080:80 sqli-kbThe image runs nginx as an unprivileged user. It sends a Content-Security-Policy header together with the other security headers.
Upload dist/ to any static host, such as GitHub Pages, Netlify or Cloudflare Pages. No server configuration is required. Every page embeds its Content-Security-Policy as a <meta> tag generated at build time. That policy allows only the site's own scripts and the hashes of its inline scripts.
Every page declares its canonical URL on websec.ca, the knowledge base's official home, so copies deployed elsewhere don't compete with it in search results. A build also publishes a sitemap only when it is served from the canonical URL. To make your deployment canonical, for example a fork with its own content, set CANONICAL_URL when building:
STANDALONE=true SITE_URL=https://kb.example.com CANONICAL_URL=https://kb.example.com/ npm run build:standaloneIf your host lets you set response headers, also send these. They cannot be set from a <meta> tag:
Content-Security-Policy: frame-ancestors 'none'
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Contributions are welcome! Please see our Contributing Guide for more details on how to contribute to this project.
For information about linting configuration and disabled rules, see docs/linting.md.
The techniques documented in this knowledge base are for educational and authorized security testing purposes only. Always obtain proper authorization before testing systems for security vulnerabilities.
This project is licensed under the MIT License - see the LICENSE file for details.