Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
Not on the map. Why?
Abstract (arXiv)
Online programming discussion platforms such as Stack Overflow serve as a rich source of information for software developers. Available information include vibrant discussions and oftentimes ready-to-use code snippets. Anecdotes report that software developers copy and paste code snippets from those information sources for convenience reasons. Such behavior results in a constant flow of community-provided code snippets into production software. To date, the impact of this behaviour on code security is unknown. We answer this highly important question by quantifying the proliferation of security-related code snippets from Stack Overflow in Android applications available on Google Play. Access to the rich source of information available on Stack Overflow including ready-to-use code snippets provides huge benefits for software developers. However, when it comes to code security there are some caveats to bear in mind: Due to the complex nature of code security, it is very difficult to provide ready-to-use and secure solutions for every problem. Hence, integrating a security-related code snippet from Stack Overflow into production software requires caution and expertise. Unsurprisingly, we observed insecure code snippets being copied into Android applications millions of users install from Google Play every day. To quantitatively evaluate the extent of this observation, we scanned Stack Overflow for code snippets and evaluated their security score using a stochastic gradient descent classifier. In order to identify code reuse in Android applications, we applied state-of-the-art static analysis. Our results are alarming: 15.4% of the 1.3 million Android applications we analyzed, contained security-related code snippets from Stack Overflow. Out of these 97.9% contain at least one insecure code snippet.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Oct 2017.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 2; 2024: 3; 2025: 2; 2026: 3.
11 papers.
- 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 72
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2024LLM Whisperer: An Inconspicuous Attack to Bias LLM Responsescited by 15
- 2024Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answerscited by 12
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questionscited by 8
- 2022GitHub Considered Harmful? Analyzing Open-Source Projects for the Automatic Generation of Cryptographic API Call Sequencescited by 2
- 2025Investigating Security Implications of Automatically Generated Code on the Software Supply Chaincited by 1
- 2026Setup Complete, Now You Are Compromised: Weaponizing Setup Instructions Against AI Coding Agentscited by 1
- 2023Skill over Scale: The Case for Medium, Domain-Specific Models for SEcited by 0
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptationcited by 0
- 2026AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptationcited by 0
- 2026AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptation5 Aug 2026
- 2026Setup Complete, Now You Are Compromised: Weaponizing Setup Instructions Against AI Coding Agents16 Jul 2026
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptation10 Jan 2026
- 2025Investigating Security Implications of Automatically Generated Code on the Software Supply Chain24 Sep 2025
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questions20 Feb 2025
- 2024LLM Whisperer: An Inconspicuous Attack to Bias LLM Responses7 Jun 2024
- 2024Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answers22 Mar 2024
- 2024Bugs in Large Language Models Generated Code: An Empirical Study13 Mar 2024
- 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generation20 Aug 2023
- 2023Skill over Scale: The Case for Medium, Domain-Specific Models for SE5 Jun 2023
- 2022GitHub Considered Harmful? Analyzing Open-Source Projects for the Automatic Generation of Cryptographic API Call Sequences24 Nov 2022