Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fortify JavaScript Hijacking: Vulnerable Framework aspx using Jquery Ajax

I am working on a legacy system, we just scanned it with HP Fortify and got JavaScript Hijacking: Vulnerable Framework, the code is below. What Can I do to secure this? I am not entirely understanding the issue.

function getMissionOverwriteDocsDataCountComponent(siteNo, fcg, catCode, facNo, assetUid, compNo) {
    // Make the Ajax call
    $.ajax({
        url: 'MissionOverwriteAj.aspx',
        data: {
                reqType: 'getMissionOverwriteDocsCountComponent',
                siteNo: siteNo,
                fcg: fcg,
                catCode: catCode,
                facNo: facNo,
                assetUid: assetUid,
                compNo: compNo
            },
        dataType: "text",
        cache: false,
        async: false,
        error: errorFunc,
        success: function(response){
            //alert(response);
            attCount = response;
        }
    });
}

This calls an ASPX page in VB

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim reqType As String = Request.Params("reqType")

            userID = Session(UserID).ToString()
            orgID = Session(OrgID).ToString()

            facility = New Facility(Request.Params("siteNo"), 
                                    Request.Params("facNo"), 
                                    Request.Params("fcg"), 
                                    Request.Params("catCode"), 
                                    Request.Params("assetUid"))

            ' Determine what type of call is being made.
            Select Case reqType
like image 542
China Syndrome Avatar asked May 13 '26 18:05

China Syndrome


1 Answers

Just kinda going on a gamble here. I think it might be referring to jQuery, but that section of your code comes up since it contains jQuery.

This site shows that Jquery has some issues in earlier versions. Try updating jQuery and rerun your audit. That should hopefully resolve the issue.

like image 170
John Pavek Avatar answered May 16 '26 08:05

John Pavek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!