Back to Cheat Sheets

⚠️ Overreliance

OWASP LLM Top 10 - LLM09

MEDIUM RISK

📋 What Is It?

Overreliance occurs when users, systems, or organizations place excessive trust in LLM outputs without proper verification, oversight, or understanding of the model's limitations. This vulnerability is critical because it can lead to incorrect decisions, misinformation spread, and automation of flawed processes based on unvalidated AI-generated content.

LLM09 OWASP Rank
Medium Technical Risk
High Business Impact

⚠️ Common Issues

  • Hallucinations: LLM generates false but plausible information
  • Blind Trust: Accepting LLM outputs without verification
  • Automation Without Oversight: Automated systems based on LLM decisions
  • Missing Context: LLM lacks full context for accurate responses
  • Outdated Knowledge: Training data cutoff causing incorrect info

🔴 Problem Flow

1. User asks LLM for critical information

2. LLM generates confident but incorrect response

3. User trusts output without verification

4. Decision made based on false information

5. IMPACT: Wrong decision, financial loss, or harm!

❌ Vulnerable Practice

# Bad: Blind execution of LLM recommendations def process_medical_advice(symptoms): # DANGEROUS: Medical advice without verification! diagnosis = llm.generate( f"Patient symptoms: {symptoms}. Provide diagnosis and treatment." ) # VULNERABLE: Direct use without validation! prescribe_medication(diagnosis.treatment) return diagnosis # Bad: Automated code deployment def auto_fix_bug(bug_description): # VULNERABLE: No code review! fix = llm.generate_code( f"Fix this bug: {bug_description}" ) # Deploy directly to production! deploy_to_production(fix) # DANGEROUS! # Bad: Financial decisions without verification def investment_decision(market_data): recommendation = llm.generate( f"Based on {market_data}, should I buy or sell?" ) # VULNERABLE: Automated trading on LLM advice! execute_trade(recommendation.action, amount=100000)

✅ Secure Practice

# Good: Human verification required def safe_medical_support(symptoms): # LLM provides suggestions only suggestions = llm.generate( f"""Patient symptoms: {symptoms} Provide PRELIMINARY information only. Remind user to consult licensed medical professional.""" ) # Add disclaimer response = { 'suggestions': suggestions, 'disclaimer': """⚠️ This is AI-generated information. NOT medical advice. Consult a licensed healthcare provider.""", 'requires_verification': True } return response # Good: Code review before deployment def assisted_bug_fix(bug_description): # LLM suggests fix suggested_fix = llm.generate_code( f"Suggest fix for: {bug_description}" ) # Validate generated code validation_result = validate_code_safety(suggested_fix) if not validation_result.safe: return {'error': 'Generated code failed safety checks'} # Queue for human review review_id = create_pull_request( code=suggested_fix, requires_approval=True, label="AI-generated" ) return { 'status': 'pending_review', 'review_id': review_id, 'message': 'Code queued for human review' } # Good: Multi-source verification def informed_investment_support(market_data): # Get LLM analysis llm_analysis = llm.generate( f"Analyze market data: {market_data}" ) # Cross-reference with real market data verified_data = get_real_time_market_data() # Compare LLM analysis with verified sources discrepancies = compare_analysis(llm_analysis, verified_data) return { 'llm_analysis': llm_analysis, 'verified_data': verified_data, 'discrepancies': discrepancies, 'confidence_score': calculate_confidence(discrepancies), 'recommendation': "Review all data sources before deciding" } # Good: Confidence scoring and fallback class VerifiedLLMSystem: def generate_with_verification(self, query): # Get LLM response response = llm.generate(query) # Check for hallucination indicators confidence = self.assess_confidence(response) if confidence < 0.7: # Low confidence - add warning return { 'response': response, 'warning': '⚠️ Low confidence. Verify independently.', 'confidence': confidence, 'sources_needed': True } return { 'response': response, 'confidence': confidence } def assess_confidence(self, response): # Check for hedging language hedging_terms = ['maybe', 'possibly', 'might', 'could be'] hedge_count = sum(1 for term in hedging_terms if term in response.lower()) # More hedging = lower confidence confidence = max(0.3, 1.0 - (hedge_count * 0.1)) return confidence

✓ Prevention Checklist

  • Never use LLM for critical decisions alone
  • Implement human-in-the-loop for important tasks
  • Cross-verify LLM outputs with authoritative sources
  • Display confidence scores with responses
  • Add disclaimers about AI-generated content
  • Educate users about LLM limitations
  • Require verification for high-stakes decisions
  • Monitor for hallucinations and errors
  • Use multiple verification methods
  • Document LLM training data cutoff dates

🔍 Detection & Tools

Verification Tools:

Fact-Checking APIs SelfCheckGPT Hallucination Detectors Source Validators Confidence Estimators

Best Practices:

RAG (Retrieval Augmented Generation) Multi-Model Consensus Human Review Workflows Citation Requirements

How to Test:

  • Ask LLM questions with known false answers
  • Test with outdated information
  • Verify factual accuracy of responses
  • Check for hallucinated sources/citations
  • Test edge cases and ambiguous queries

🌍 Real-World Examples

  • Lawyer Sanctions (2023): Attorney cited fake cases generated by ChatGPT in court filings
  • News Article Errors: CNET published articles with factual errors from AI without verification
  • Medical Misinformation: Users made health decisions based on incorrect LLM medical advice
  • Code Vulnerabilities: Developers deployed insecure code generated by AI without review
  • Financial Losses: Investors lost money following unverified AI trading recommendations

📌 Quick Tips

  • DO NOT use LLM for medical/legal advice
  • DO NOT automate critical decisions
  • DO NOT skip fact-checking
  • DO verify all outputs
  • DO require human review
  • DO show confidence scores

📜 Compliance

Related Standards:

  • NIST AI RMF - Transparency & Accountability
  • EU AI Act - High-Risk AI Systems
  • ISO 42001 - AI Management System
  • GDPR Art. 22 - Automated Decisions
  • IEEE 7000 - AI Ethics