# An investigation into code injection vulnerabilities caused by generative AI

DevFeed: [An investigation into code injection vulnerabilities caused by generative AI](<https://devfeed.tech/articles/an-investigation-into-code-injection-vulnerabilities-caused-by-generative-ai-7866.md>)

Original publisher: [Read original article](<https://snyk.io/blog/code-injection-vulnerabilities-caused-by-generative-ai/>)

Author: Jack Hair

Published: 2024-04-16T05:00:00Z

Content type: article

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [Generative AI](<https://devfeed.tech/topics/generative-ai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Vulnerabilities](<https://devfeed.tech/topics/vulnerabilities.md>), [prompt injection](<https://devfeed.tech/topics/prompt-injection.md>), [Security](<https://devfeed.tech/topics/security.md>), [Code](<https://devfeed.tech/topics/code.md>), [snyk-code](<https://devfeed.tech/topics/snyk-code.md>), [snyk](<https://devfeed.tech/topics/snyk.md>)

Tags: [acquisition](<https://devfeed.tech/tags/acquisition.md>), [ai](<https://devfeed.tech/tags/ai.md>), [article](<https://devfeed.tech/tags/article.md>), [awareness](<https://devfeed.tech/tags/awareness.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [code-security](<https://devfeed.tech/tags/code-security.md>), [devops](<https://devfeed.tech/tags/devops.md>), [devrel](<https://devfeed.tech/tags/devrel.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [google](<https://devfeed.tech/tags/google.md>), [interest](<https://devfeed.tech/tags/interest.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [openai](<https://devfeed.tech/tags/openai.md>), [prompt-injection](<https://devfeed.tech/tags/prompt-injection.md>), [security](<https://devfeed.tech/tags/security.md>), [snyk](<https://devfeed.tech/tags/snyk.md>), [snyk-apprisk](<https://devfeed.tech/tags/snyk-apprisk.md>), [snyk-code](<https://devfeed.tech/tags/snyk-code.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

This article investigates security risks arising when generative AI and large language models are used in software. It describes an analysis of more than 4,000 Python repositories using common LLM APIs, focusing on code injection vulnerabilities caused by LLM-derived data. It also explains LLMs, hallucinations, untrusted output, and prompt injection.

## Source excerpt

This article looks at the potential security implications of large language models (LLMs), a text-producing form of generative AI.