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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:39:53+00:00 2026-05-22T16:39:53+00:00

I have a webforms app that allows users to submit URLs of images to

  • 0

I have a webforms app that allows users to submit URLs of images to the site.
These images are then screened by myself in the admin console before making them available on the site for everyone to see. They do not have to submit an image, it could be a link to a page where the image is contained.

Webforms protects against malicious input by default, but only when injecting javascript into the input box. So it will instantly pick up things like <script type="text/javascript">alert('nasty code');</script> but not http://www.nastysite.com/nastyScript.js as this is simply a url, and ‘could’ be a valid image.

in the admin console i list all submissions in a datalist control and use an asp:Image control to display the image for inspection.

If a user were to submit a malicious script could this be executed in my browser when the admin console page is rendered? I have tried this myself by writing a script that hooks into document loaded to show an alert, and nothing happens.

I figure i should display the submitted URL as well as rendering it so i can check for any odd looking submissions.

One other thing that concerns me is that if i approve an image from another site – could they later swap the valid image out for a nasty script? i would assume not if its in an img tag?

Am i overlooking any potential weaknesses?

  • 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-05-22T16:39:54+00:00Added an answer on May 22, 2026 at 4:39 pm

    When a web browser loads a resource as the SRC of an IMG tag, it will parse the response as an image file. If someone were to submit a URL to a JavaScript file instead, the result would merely be a broken/missing image.

    That said, there are still security concerns with externally-linked photos:

    1. As you’ve already stated, someone could swap the image out after the fact to, say, pr0n.

    2. They will be able to track the IP address, timestamp, and browser identity of all of the visitors to your site who see the image. Depending on your visitors’ browser settings, they could also set cookies to track your users as they visit both your site and others that allow similar linking. This is of course how pretty much all of the image-only banner ad services work.

    3. If a particular browser were susceptible to a malformed image file, they could swap the image out to such a file, which could then crash or lock up the users’ browsers. In the extreme case, it could allow them to breach browser security. Browsers in general tend to be relatively hardened against malformed image attacks, but it is a possibility another one could be discovered.

    4. They could theoretically change the image file to a 302 redirect response to some other URL, which might not be an image at all. The visitor would only see a broken image, but if you have enough traffic, they could wield those redirects to, say, perform a DDoS on another web site. (I’d put this in the “paranoia” category.)

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

Sidebar

Related Questions

I have a .NET webforms front end that allows admin users to upload two
I have a very simple webforms app that will allow field techs to order
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
I have a reporting module in an ASP.NET webforms app (C#) that uses dynamic
I have an asp .net webforms app that uses forms authentication. For a small
We have an ASP.NET webforms app that has try/catch blocks all throughout. In the
I have a webforms app that uses a few ASP.NET AJAX Timer controls (i.e.
I have an ASP.Net webforms app, that uses Ninject 2.2.0.0 I have a HTTPHandler
I have an ASP.net webforms app that connects to a web service, All the
I have a webform that allows users to dynamically add 'sections' (which are divs

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.