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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:54:19+00:00 2026-05-29T14:54:19+00:00

By default, browsers don’t allow cross-site AJAX requests. I understand that a badly envisioned

  • 0

By default, browsers don’t allow cross-site AJAX requests.

I understand that a badly envisioned cross-domain request can be a security risk. If I take the html or the javascript of an external site and just “render” it into my website, that’s a problem. That external code could be used for lots of bad things – like getting access to the current user’s session data.

But if I only request JSON or XML data, and I use a proper library to parse the JSON (not just using eval) I can’t imagine how that would be a security risk. The worse that can happen is that the content coming from that site doesn’t render correctly.

Am I missing anything? Is it possible to compromise a page that reads json/xml simply by sending it some kind of malicious data?

  • 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-29T14:54:20+00:00Added an answer on May 29, 2026 at 2:54 pm

    The risk isn’t to the site making the request.

    For example:

    1. Alice visits Her Bank and logs in.
    2. She then visits Evil Site.
    3. Evil Site uses JavaScript to cause Alice’s browser to make a request to Her Bank
    4. Her Bank responds with Alice’s account details and passes them to the JavaScript
    5. The JavaScript then passes them on to the controller of Evil Site

    In a nutshell — it prevents attackers from reading private data from any site that Alice has credentials for (and ones that are behind a firewall, e.g. Alice’s corporate Intranet).

    Note that this won’t prevent attacks which don’t depend on being able to read data form the site (CSRF), but without the Same Origin Policy the standard defence against CSRF would be easily defeatable.

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

Sidebar

Related Questions

Browsers allow text-areas to be re-sized by dragging their corner by default. I was
What is the default behavior of browsers if the columns don't add up to
Grids in ExtJS 4 (Sencha) don’t allow to select content by default. But I
I don't like to use IE for my system default web browser. but I
The default behaviour in browsers is to select the next form element. I want
By default in all browsers, title attributes only show on mouse over. I want
Many mobile web browsers have some default functionality on image hold. For example, user
Is there a common method/api to list all web browsers (name, executable, default yes/no)
I do like this on my document ready: $(thead).addClass(ui-state-default); $(tbody).addClass(ui-state-highlight); And I noticed that
I am working on a Firefox extension that will involve ajax calls to domains

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.