Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8793339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:06:37+00:00 2026-06-13T23:06:37+00:00

Testing a web application, I can upload GIF/JPEG files and I know there is

  • 0

Testing a web application, I can upload GIF/JPEG files and I know there is a possible threat when including PHP Code properly in that GIF/Jpeg (because it is modified using imagecreatetruecolor and imagejpeg).

I was looking for an existing GIF file containing a simple PHP code (like phpinfo or echo ‘hello world’) just to validate that the threat was concrete.

What would be perfect is a specifically crafted GIF image containing PHP code in the middle OR in the palette color, but I was unsuccessful to find one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:06:37+00:00Added an answer on June 13, 2026 at 11:06 pm

    I’ll answer myself for the jpg link file containing PHP code execution, but if someone else provide a more complete answer, I’ll offer the accepted check 😉

    Here’s a link to a “compromised” JPEG file containing PHP exploit code (phpinfo)

    (don’t worry, the file won’t do anything to you)

    Moreover, it’s important to notice that even if you succeed into uploading a gif file containing php code, if that gif file is read as gif (and not executed as php, via include/require, or a badly configured server), it won’t do anything, just have php code on your server, useless.

    So in order for this attack to work, you need to have two conditions :

    1. The website must use a fileupload at some point that you can access
    2. The files stored must be executed via PHP, even the image files (in that case).

    Although the 1. is quite easy to have, the second is near impossible nowadays. The default configuration for PHP is to run the PHP interpreter only for .php files, either using NGinx, Apache, Lighttpd, etc.

    In conclusion, this vector of attack is really low in probability of success.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using WatiN for web application testing. There is a field called enter choices
I am doing client side testing for my web application using IE only, there
I am doing client side testing for my web application using IE only, there
I am load testing a web application and wondering if there is a way
how can i automate testing of a web based application? What are some frameworks
I am diving into the web application testing line(php ,ajax,javascript) and need some guidance.
I have found a lot of topics about stress-testing web application. My goals are
I am testing a web application using Java Remote Method Invocation (RMI). When I
I am testing that a web application is working as it is supposed to:
I'm looking for a tool to record scripts for web application testing in python,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.