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 8038121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:07:54+00:00 2026-06-05T03:07:54+00:00

I am currently faced with an issue, and am trying to explore the security

  • 0

I am currently faced with an issue, and am trying to explore the security risks involved in the following scenario.

Website A has the following code:

<img src="http://www.websiteb.com/loadimage.php?path=http://www.websitea.com/images/logo.png" />

Website B:
The following comments is an example of what will happen in loadimage.php (I do not require the code for this page)

/* Use CURL to load image from $_GET['path'] and output it to page.

Do you believe there could be any security risks associated with Website B being exploitable somehow?

Thanks

  • 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-05T03:07:55+00:00Added an answer on June 5, 2026 at 3:07 am

    Yes – you’re opening yourself up for abuse (assuming you’re writing the CURL function). Others can create spurious links and use your code to request pages from others, or to deliver attacks or to try to distribute malicious content (e.g. they host a virus, put your website’s script to deliver that virus and your website gets a bad name).

    But you can mitigate it in the following ways (pick and choose, depnding on your situation):

    1. If possible, remove the domain name from the path; if you know all the images come from the domain, then remove it and add in the PHP. This restricts people from abusing it as it restricts purely to your domain.

    2. If you have a selection of domains, then instead verify the domain in the URL matches what you expect – again, to restrict free reign of what gets downloaded.

    3. If you can strip all paramters from the image URL (if you know you’ll never need them) then also remove parameters. Or if you can match a particular pattern of parameters, strip all the others. This limits potential a bit.

    4. Validate it’s an image when you’ve pulled it in.

    5. Track downloads from a particular IP address. If they exceed an expected amount, then stop delivering more. You’ll need to know what an expected amount is.

    6. If you deliver both the HTML and the image download, you can only deliver the files you’re expoecting to deliver to that page. Basically if you get a request to deliver the HTML page then you know what images will also be requested subsequently. Log them against the requesting IP and the requesteing agent, and allow delivery for 60 minutes. If you’re not epecting a request (i.e. no match with IP / agent) then don’t deliver. (Note: normally you can’t rely on IP or Agent for stuff as they can both be forged, but for these purposes, it’s fine).

    7. Track by cookies. Similar to above, but use a cookie to narrow down the browser as opposed ot tracking by IP and agent.

    8. Also similar to above, you can create a unique id for each file (e.g. “?path=avnd73q4nsdfyq347dfh” and you store in a database what image you’re going to deliver for that unique_id. Unique_id’s expire after a while.

    9. Final measure, change the name of the script peridically – overlay for a bit, then retire the old script. .

    I hope that gives an idea of what you can do. Choose accroding to what you can.

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

Sidebar

Related Questions

I'm refactoring a library we currently use, and I'm faced with the following problem.
I'm currently trying to create a C source code which properly handles I/O whatever
So I'm trying to code out my design for my new portfolio website, but
I've faced the following scenario quite often so I'm wondering if there is a
Currently I face the following issue - I create a custom ListView ( 1
I faced following issue with my work: having two projects: MFC .dll and MFC
Currently playing about with KnockoutJS. Just trying to update an observable array from a
I am trying to fetch and display contents from table.Currently i am running a
I am currently having an issue with the JSF pages that the Visual Web
please read all of this before commenting. I'm currently working on a large website

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.