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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:31:28+00:00 2026-05-16T08:31:28+00:00

Recently a client was concerned that their SWF was insecure because the XML path

  • 0

Recently a client was concerned that their SWF was “insecure” because the XML path was coming from Flashvars. This seems to me to be something that isn’t really a concern as the SWF is only displaying images / text and a few button links. I can understand how someone could path to the swf and add a remote XML path in to add javascript to the button url targets, but really what damage could this do?
Eg.
they could change

http://mysite.com/theflash.swf?xmlpath=xml/thedata.xml

to this

 http://mysite.com/theflash.swf?xmlpath=http://dodgysite.com/thechangeddata.xml

Obviously they could build a fake wrapper html file around this but I still don’t see how they could do anything harmful with this. Am I missing something?

My next question is what is the best way to go about preventing this from happening?
So far I have in my XSS checking class:

  • unescape the string and remove any
    spaces or linebreaks (\t, \n, \r)
  • check the string for any of the
    following (asfunction:, javascript:,
    event:, vbscript:)
  • check for absolute or relative path
    by looking for (http or https)
  • if absolute, check that the domain is
    the same as the main movie.

Most of this process I found in this article: http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps_02.html

Is there a better way than this?
What else could be done to prevent XSS in flash?

  • 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-16T08:31:28+00:00Added an answer on May 16, 2026 at 8:31 am

    Blacklisting is a terrible solution. The implicit assumption is that “I’ll be able to catch all attacks if I look for these substrings”; it’s often wrong:

    1. You add an “upload” facility to your site (wiki/bug tracker/whatever), which sticks uploaded files in /userUploads/. There are lots of security problems with this, but let’s say that you manage to filter out “unsafe” files (HTML containing JavaScript, etc). Fine.
    2. The attacker uploads an XML file. Your upload script thinks it’s “safe” because it’s not HTML and doesn’t include tags.
    3. The attacker sends someone to http://example.com/theflash.swf?xmlpath=../../../../userUploads/innocent.xml.

    Ultimately, you’re trying to figure out how a URL parser will treat the string by looking for a few substrings. It’s much more effective to stick it through a URL parser and extract the relevant semantics yourself.

    I think a potentially safe option is to ensure that the path starts with “xml/” and doesn’t contain “/../”, but it’s still a terrible “solution”.

    A better option is a whitelist: The filename can only contain [a-z0-9_-]. You generate the path with “xml/$filename.xml”. This works provided you don’t make a “test.xml”.

    An even better option is just to maintain a mapping from names to paths, e.g. “data” maps to “xml/data.xml”, but “exploit” has no mapping, so it returns an error. It means you can’t add files as easily, but also means that the user cannot specify arbitrary paths.

    EDIT: Security problems like this arise because of unexpected interactions between different parts of the system (“all files on the filesystem can be trusted”) or incorrect assumptions (“URL resolution will give a URL under the same ‘directory'”, “concatenating paths can’t navigate up the directory hierarchy”, “all filenames are normal”, “checking whether a directory exists can’t create it”). I’ve given an example; no doubt there are others.

    If you need to make the config different per deployment, then … use a config! foo.swf could fetch config.xml, which contains a list of allowed paths. Better is to have config.xml give a mapping from page name to XML path.

    In general, exposing implementation details like “all paths happen to match xml/.*\.xml” is icky, a layering violation, and looks a lot like bad security.

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

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I recently asked a question that got shot down for being too strongly worded.
I am a reasonably experienced C# developer (about 5 year experience) that has recently
At the company that I work with, we often have to integrate with client’s
Recently, I read this article: http://download.oracle.com/javase/tutorial/extra/generics/wildcards.html My question is, instead of creating a method
Recently i've switched to PHP 5.3+ and after that migration i learned that the
I posted this over at reddit but it didn't gain any momentum. So here
I used to work in JavaScript a lot and one thing that really bothered
I've been learning a lot about web technologies recently and I want to put
Currently, I'm sitting on an ugly business application written in Access that takes a
We have a system that uses a SQL server 2005 database with a number

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.