Why Security Testing Matters for QA

Security breaches cost companies an average of $4.45 million per incident (IBM Cost of a Data Breach Report, 2023). Beyond financial impact, breaches destroy customer trust, trigger regulatory penalties, and can end careers.

As a QA engineer, security testing is your responsibility. You do not need to be a certified ethical hacker, but you must understand security principles well enough to catch common vulnerabilities before they reach production. Many of the most damaging breaches in history were caused by simple, preventable issues — missing input validation, default passwords, exposed API keys — that a security-aware QA engineer would have caught.

The CIA Triad

The CIA triad is the foundation of information security. Every security requirement maps to one of these three properties.

Confidentiality

Data should only be accessible to authorized users.

What to test:

  • Can users access data belonging to other users? (IDOR — Insecure Direct Object Reference)
  • Is sensitive data (passwords, tokens, PII) encrypted at rest and in transit?
  • Are API responses leaking more data than necessary?
  • Does the application expose sensitive information in error messages, logs, or URLs?
  • Are there authorization checks on every API endpoint?

Integrity

Data should not be tampered with — accidentally or maliciously.

What to test:

  • Can users modify data they should not have write access to?
  • Is input validated on the server side (not just client side)?
  • Are database records protected from SQL injection?
  • Can API requests be tampered with in transit (man-in-the-middle)?
  • Are checksums or signatures used for critical data?

Availability

Systems should be accessible when users need them.

What to test:

  • Can the system be crashed by a single malformed request (DoS)?
  • Are there rate limits to prevent abuse?
  • Does the system handle resource exhaustion gracefully?
  • Are there backup and recovery mechanisms?
  • Can a single component failure take down the entire system?

Types of Security Testing

TypeWhat It DoesWho Does ItWhen
Vulnerability ScanningAutomated scan for known vulnerabilitiesQA team or DevOpsEvery sprint/release
Penetration TestingManual attempt to exploit vulnerabilitiesSecurity specialistsQuarterly or before major releases
Security AuditReview of security controls and policiesInternal or external auditorsAnnually or for compliance
Code ReviewManual inspection of source code for security flawsDevelopers + security teamDuring development
SASTStatic Application Security Testing (automated code analysis)CI/CD pipelineEvery commit
DASTDynamic Application Security Testing (runtime scanning)CI/CD or QAEvery deployment
Threat ModelingSystematic identification of potential threatsArchitecture + security teamDesign phase

Vulnerability Scanning vs Penetration Testing

AspectVulnerability ScanningPenetration Testing
AutomationFully automatedMostly manual
DepthBroad but shallowNarrow but deep
FrequencyContinuous (CI/CD)Periodic (quarterly)
Skill neededLow (run tools)High (ethical hacking)
OutputList of potential vulnerabilitiesProof of exploitation
False positivesCommonRare (validated manually)
CostLowHigh

Security Testing Mindset

The shift from functional to security thinking:

Functional MindsetSecurity Mindset
“Does the login form work?”“Can I bypass the login form?”
“Can users submit the form?”“Can I submit malicious data through the form?”
“Does the API return correct data?”“Can I access other users’ data through the API?”
“Does file upload work?”“Can I upload a malicious file that executes on the server?”
“Does search return results?”“Can I inject SQL through the search field?”
“Does the session expire?”“Can I hijack someone else’s session?”

Common Vulnerability Categories

Authentication flaws:

  • Default credentials left active
  • No account lockout after failed attempts
  • Weak password requirements
  • Missing multi-factor authentication
  • Insecure password reset flows

Authorization flaws:

  • Horizontal privilege escalation (accessing another user’s data)
  • Vertical privilege escalation (accessing admin features as a regular user)
  • Missing function-level access control
  • IDOR (manipulating IDs in URLs or API calls)

Input validation flaws:

  • SQL injection
  • Cross-site scripting (XSS)
  • Command injection
  • Path traversal
  • XML external entity (XXE) attacks

Data exposure:

  • Sensitive data in URLs or query parameters
  • API responses containing unnecessary fields
  • Error messages revealing system internals
  • Lack of encryption for sensitive data
  • Hardcoded credentials in source code

Security Testing as a QA Engineer

You do not need to be a penetration tester to add security value. Here are security checks every QA engineer should perform:

  1. Test authorization: Try accessing resources without authentication. Try accessing other users’ data by changing IDs in URLs.
  2. Test input validation: Enter special characters (' " < > ; --), very long strings, and unexpected data types in every input field.
  3. Check error messages: Ensure errors do not reveal stack traces, database names, file paths, or other system details.
  4. Verify HTTPS: Ensure all pages and API calls use HTTPS. Check for mixed content warnings.
  5. Test session management: Verify sessions expire, tokens are not predictable, and logout actually invalidates the session.
  6. Check headers: Look for security headers (Content-Security-Policy, X-Frame-Options, Strict-Transport-Security).

Exercise: Security Risk Assessment

Given a web application design, identify potential security risks across all three CIA triad dimensions.

Application: Online Banking Portal

Features: User login with email/password, account balance view, money transfers between accounts, transaction history, PDF statement download, profile settings with personal information.

Task

For each feature, identify:

  1. At least one confidentiality risk
  2. At least one integrity risk
  3. At least one availability risk
  4. The severity (Critical/High/Medium/Low)
  5. A recommended mitigation
Hint: Think Like an Attacker

For each feature, ask: “What if someone tries to…” - access without permission, modify data, send malicious input, overwhelm the system, intercept communications.

Solution: Security Risk Assessment
FeatureCIARiskSeverityMitigation
LoginCBrute force password guessingCriticalAccount lockout after 5 failed attempts + CAPTCHA
LoginICredential stuffing with leaked passwordsCriticalMFA, breached password checking (HaveIBeenPwned API)
LoginADoS attack on login endpointHighRate limiting (10 req/min per IP)
Balance viewCIDOR — changing account ID to view other accountsCriticalServer-side authorization checking user-to-account ownership
Balance viewICache poisoning showing wrong balanceMediumCache invalidation on balance change, integrity checks
TransfersCTransaction details visible in server logsHighRedact sensitive fields in logs
TransfersIRace condition allowing double transfersCriticalDatabase-level locking, idempotency keys
TransfersALarge batch transfer causing timeoutMediumQueue-based processing, transaction limits
Transaction historyCSQL injection in date filter revealing all users’ transactionsCriticalParameterized queries, input validation
PDF downloadCPath traversal in PDF filename parameterHighWhitelist allowed filenames, serve from isolated storage
PDF downloadIInjecting malicious content into generated PDFMediumSanitize all user input in PDF templates
ProfileCPII exposed in API response without needMediumReturn only requested fields, mask SSN/DOB
ProfileIXSS via name field displayed to support agentsHighOutput encoding, Content-Security-Policy header

Top 3 priorities: (1) IDOR on balance view, (2) Race condition on transfers, (3) SQL injection on transaction history.

Pro Tips

  • Shift Left on Security: Integrate security testing into every sprint, not just before releases. Use SAST tools in CI/CD to catch vulnerabilities in code automatically.
  • Learn to Use Burp Suite: Even basic Burp Suite skills (intercepting requests, modifying parameters, replaying requests) dramatically improve your security testing ability. The Community Edition is free.
  • Keep an Eye on CVE Databases: Subscribe to CVE alerts for your technology stack. When a new vulnerability is published for a library you use, test whether your application is affected.
  • Security Champions Program: Advocate for a security champion in each team — a developer or tester who takes extra security training and reviews security-sensitive changes.
  • Never Test Security in Production: Security testing can cause damage (deleting data, locking accounts). Always use a dedicated test environment that mirrors production.