You can download the patch for your version here: http://members.vbulletin.com/patches.php
To install the patch:
1) Download the appropriate files for your version of vBulletin 3
2) Upload all files found within the zip file. Make sure to overwrite the existing files on your server.
This should not affect your modified settings.
If you're using version 3.8.6 or before, then you should upgrade to your installation of vBulletin to 3.8.9.
In addition to the patches, a new version of vBulletin 3.8.10 Beta is also available. Please perform a regular upgrade if you are using the beta.
3.8.9 Patch Level 1
3.8.8 Patch Level 2
3.8.7 Patch Level 6