PrivateBin

A minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES.

OTHER License

Downloads
68
Stars
6.4K
Committers
120

Bot releases are hidden (Show)

PrivateBin - Release v1.6.0 - Adding new translations and dropping support for PHP < 7.3

Published by elrido about 1 year ago

This release adds translations for Japanese & Arabic and increases the minimal required PHP version to 7.3.

In addition to the two new translations for the Japanese & Arabic languages, the Email-button is now a configurable option, but still enabled by default.

The minimum supported PHP version is now 7.3, due to having upgraded the PHP unit test framework which no longer supports older PHP releases. This simplifies our development (we no longer need to maintain a parallel branch that ensured PHP 8 compatibility) and let us drop a library that provided a more cryptographically secure random function to PHP 5.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a container images using the nginx web server with php-fpm and one using the nginx unit application server, that include the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.5.2

  • ADDED: Translations for Japanese & Arabic
  • ADDED: Configuration option to disable Email button (#1164)
  • CHANGED: Minimum required PHP version is 7.3, due to upgrading PHPunit (#707)
  • CHANGED: Removed PHP 5 polyfill for random_bytes()
PrivateBin - Release v1.5.2 - S3 storage improvements & library updates

Published by elrido over 1 year ago

This release contains an improvement for the S3 storage & updates several libraries.

This patch release allows the AWS SDK to use default credential provider chain when using the S3 storage backend, exposes the used JSON-LD types in the API, addresses PHP 8.2 deprecation warnings and includes several updated libraries, including some security fixes.

When using the S3 storage backend, you now have the option of passing the S3 credential configuration in other ways than just the PrivateBin configuration file. If the credentials are not set in configuration, the AWS SDK will use the default credentials provider chain, which will look for credentials in a few places automatically, including environment variables or instance roles. For details on these, see the SDK's documentation on the default credentials provider chain

The updated DOMpurify & jQuery libraries contain some security fixes. While we are not aware that these could be used with PrivateBin, for example to bypass DOMpurify filtering of the user provided paste contents to inject malicious code displayed to visitors, upgrading these prevents these from becoming an issue.

Finally, the administration script introduced in the last release, made use of a form of string interpolation that got deprecated in PHP 8.2, causing it to emit warning messages, when running it on that PHP version. It was the only area that needed any changes for PHP 8.2 and our container images have already been using PHP 8.2 for a few months without any issues.

Benefits of switching to the new release

We recommend to upgrade all instances, due to the security fixes in the included DOMpurify & jQuery libraries.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a container images using the nginx web server with php-fpm and one using the nginx unit application server, that include the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.5.1

  • ADDED: Allow AWS SDK to use default credential provider chain for S3Storage (#1070)
  • CHANGED: Upgrading libraries to: DOMpurify 3.0.4 & jQuery 3.7.0
  • FIXED: Addressed PHP 8.2 deprecation warnings (#1092)
  • FIXED: Expose types JSON-LD incl. configured expiration dates (#1045)

Help wanted & greatly appreciated

Apart from the large tasks that require deeper insight and time, there are also smaller issues were help is wanted, topics open to debate and of course many languages that still remain to be translated. We are also still looking for additional long term maintainers among our frequent issue helpers.

What can we offer you in return for your help?

  • We can offer you our mentorship, if this is your first time participating as a maintainer of an open source software project. We can guide you through submitting your first pull requests and work with you to ensure your change fulfills the communities quality standards, gets merged and makes it into a release.
  • Your work gets publicly credited. This can help you build up a resume, showing off your growing skill set, in programming as well as your soft skills.
  • PrivateBin is a smaller project. If you'd like to learn how to participate and contribute in an open source git project, this should be less overwhelming then larger projects.
  • We do have a decent unit test code coverage, so it is an environment forgiving of mistakes. You may still introduce logical flaws or issues in new features, not yet covered in the tests, but you can rely on the tests preventing any regressions in other areas.
  • You don't have to be proficient in multiple programming languages, there are a lot of things to improve within either the JavaScript or PHP areas that don't need you to understand the other side, beyond their shared API.
  • It can be an opportunity to learn about continuos integration tools to automate tasks like tests, security scans, etc.

If you are interested in helping with any of these points, we have prepared a development guide including design goals, code structure and tools to get you started. For any questions, you can chat with the maintainers in the discussion area or reach us via email.

Plans for future releases

The next minor release will focus on user interface improvements.

PrivateBin - Release v1.5.1 - Filesystem purge lookup change & administration script

Published by elrido almost 2 years ago

This release reverts a filesystem purge lookup change and adds a script for administrative tasks.

This patch release partially reverts a change to the filesystem backend's purge lookup, adds a script for administrative tasks, catches JSON errors when malformed pastes get uploaded and includes updated libraries for GCS and S3 backends.

Release 1.5.0 contained a simplification to the filesystem backend's purge logic, which could lead to very resource intensive purge cycles on instances with a large storage footprint. This release retains the glob pattern, but re-adds the limited and randomized lookup. The limit gives up searching after 10 times the purge batch size and the randomization prevents re-opening the same, non-expired pastes over and over. Without these mechanisms, eventually all expired pastes got purged, and every further purge reads all pastes from disk, without finding anything, which wastes time and resources.

PrivateBin now adds another script to help perform administrative tasks. The new script, called administration, helps with deleting pastes, removing empty directories, when using the filesystem backend, purging all expired pastes at once and gathering statistics on an instance.

Deleting pastes is relatively easy to do manually with the filesystem and database backends, but more difficult on GCS or S3 storage. The new tool works the same, regardless of backend, letting server administrators delete pastes by ID.

When using the filesystem backend, the purge does not remove empty directories, as they can be reused by new pastes with IDs starting on the same first 2 bytes. These empty directories can now be removed, if desired.

The administration script also can issue a full purge cycle. Instances could disable the automatic purge on paste/comment creation in their configuration and instead use a cron job to run full purges on a schedule. Or it could be issued before a backup, to avoid archiving expired data.

Finally, the script can be used to gather and display statistical information. This includes the total number of pastes the instance hosts, as well as how many of these are expired, of the burn-after-reading type, include discussions and what formatting they use (plain text, source code or markdown).

The release includes smaller improvements to catch a JSON parsing exception when malformed pastes get uploaded to the API and updates the suggested library versions for GCS and S3 storage backends. We had gotten reports of the S3 library in 1.5.0 having emitted deprecation warnings on PHP 8.1.

Benefits of switching to the new release

We recommend to upgrade 1.5.0 instances using the (default) filesystem storage backend as well as instances using S3 storage and PHP > 8.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.5.0

  • ADDED: script for administrative tasks: deleting pastes (#274), removing empty directories (#277), purging expired pastes (#276) & statistics (#319)
  • FIXED: Revert Filesystem purge to limited and randomized lookup (#1030)
  • FIXED: Catch JSON decode errors when invalid data gets sent to the API (#1030)
  • FIXED: Support sorting v1 format in mixed version comments in Filesystem backend (#1030)

Help wanted & greatly appreciated

Apart from the large tasks that require deeper insight and time, there are also smaller issues were help is wanted, topics open to debate and of course many languages that still remain to be translated. We are also still looking for additional long term maintainers among our frequent issue helpers.

If you are interested in helping with any of these points, we have prepared a development guide including design goals, code structure and tools that should get you started. For any questions, you can also chat with the maintainers in the discussion area.

Plans for future releases

The next regular release will focus on user interface improvements.

This release adds an S3 storage backend, a storage migration script, and new translations.

This minor release adds support for Simple Storage Service (S3), a storage migration script, adds four new languages to the translations and includes updated libraries.

The new S3 storage backend can be used with Ceph, Amazon Web Services or other S3 providers. A migration script was also provided, which can migrate existing instances from one storage backend to another, including in between the same storage backend types, but with different configurations (i.e. from one directory to another or one database to another).

The release includes several smaller improvements to the MariaDB and MySQL support. It reverts to CREATE INDEX without IF NOT EXISTS clauses (introduced in 1.4.0) which are not supported in MySQL. It also avoids requiring the SUPER privilege for the sql_mode added in 1.4.0. Indexes now also make use of the table prefix, to support multiple instances sharing a single database.

Jdenticons were added as a fourth option for comment icons, in addition to identicons and vizhash (and using none). The new icon type adds a different style and they don't require the PHP GD module to be generated. They are larger in size than identicons, a bit smaller than vizhash and slower to generate than either.

If using the YOURLS URL shortener with a signature and would like to keep it hidden, as of this release a server side integration via a proxy can be used, storing the signature only in configuration.

Benefits of switching to the new release

We recommend to upgrade 1.4.x instances using MariaDB backend and any instance that would like to make use of any of the new features or translations.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.4.0

  • ADDED: script for data storage backend migrations (#1012)
  • ADDED: Translations for Turkish, Slovak, Greek and Thai
  • ADDED: S3 Storage backend (#994)
  • ADDED: Jdenticons as an option for comment icons (#793)
  • CHANGED: Avoid SUPER privilege for setting the sql_mode for MariaDB/MySQL (#919)
  • CHANGED: Upgrading libraries to: DOMpurify 2.4.6, jQuery 3.6.1, Showdown 2.1.0 & zlib 1.2.13
  • FIXED: Revert to CREATE INDEX without IF NOT EXISTS clauses, to support MySQL (#943)
  • FIXED: Apply table prefix to indexes as well, to support multiple instances sharing a single database (#943)
  • FIXED: YOURLS integration via new proxy, storing signature in configuration (#725)

Help wanted & greatly appreciated

Apart from the large tasks that require deeper insight and time, there are also smaller issues were help is wanted, topics open to debate and of course many languages that still remain to be translated. We are also still looking for additional long term maintainers among our frequent issue helpers.

If you are interested in helping with any of these points, we have prepared a development guide including design goals, code structure and tools that should get you started. For any questions, you can also chat with the maintainers in the discussion area.

Plans for future releases

The next regular release will focus on user interface improvements.

This release improves the safety of the SVG attachment preview, adds Google Cloud Storage and Oracle database support, and new translations.

This minor release addresses a security issue with the SVG attachment preview, adds support for Google Cloud Storage (GCS) and Oracle databases, adds four new languages to the translations and includes updated libraries.

The storage system got reworked as part of the new Google Cloud Storage class and when not using the default file storage, the server salt and purge and traffic limiter items are now stored as part of the selected storage backend. It is now possible to run PrivateBin with database or GCS backend without requiring any write access to the data directory - automatic migrations run the first time any of these get accessed and found to be still present in the filesystem.

Benefits of switching to the new release

We recommend to upgrade 1.3.x instances to improve the resolved security issues. At the very minimum, please update your CSP headers in the configuration file to our currently recommended settings. You can check the headers of your instance via our new instance check service.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.3.5

  • ADDED: Translations for Corsican, Estonian, Finnish and Lojban
  • ADDED: new HTTP headers improving security (#765)
  • ADDED: Download button for paste text (#774)
  • ADDED: Opt-out of federated learning of cohorts (FLoC) (#776)
  • ADDED: Configuration option to exempt IPs from the rate-limiter (#787)
  • ADDED: Google Cloud Storage backend support (#795)
  • ADDED: Oracle database support (#868)
  • ADDED: Configuration option to limit paste creation and commenting to certain IPs (#883)
  • ADDED: Set CSP also as meta tag, to deal with misconfigured webservers mangling the HTTP header
  • ADDED: Sanitize SVG preview, preventing script execution in instance context
  • CHANGED: Language selection cookie only transmitted over HTTPS (#472)
  • CHANGED: Upgrading libraries to: base-x 4.0.0, bootstrap 3.4.1 (JS), DOMpurify 2.3.6, ip-lib 1.18.0, jQuery 3.6.0, random_compat 2.0.21, Showdown 2.0.3 & zlib 1.2.12
  • CHANGED: Removed automatic .ini configuration file migration (#808)
  • CHANGED: Removed configurable dir for traffic & purge limiters (#419)
  • CHANGED: Server salt, traffic and purge limiter now stored in the storage backend (#419)
  • CHANGED: Drop support for attachment download in IE
  • FIXED: Error when attachments are disabled, but paste with attachment gets displayed

Help wanted & greatly appreciated

Apart from the large tasks that require deeper insight and time, there are also smaller issues were help is wanted, topics open to debate and of course many languages that still remain to be translated. We are also still looking for additional long term maintainers among our frequent issue helpers.

If you are interested in helping with any of these points, we have prepared a development guide including design goals, code structure and tools that should get you started.

Plans for future releases

The next regular release will focus on user interface improvements.

PrivateBin - Release v1.3.5 - Fixing several smaller issues, adding new translations

Published by elrido over 3 years ago

This bug fix releases addresses a number of smaller issues and regressions, adds four new translations and includes updated libraries. Links in pastes now by default open in a new browser tab or window. The project information text and link is now a configuration option.

Benefits of switching to the new release

We recommend to upgrade 1.3.x instances to address these issues.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

If you have enabled the fileupload setting and use a custom cspheader, please consider adding allow-downloads to the sandbox property. This lets users of the Google Chrome browser, version 83 or higher, download attachments - inline display of images, media or PDFs files was not affected by this change in Chrome's sandbox behaviour.

Changes since version 1.3.4

  • ADDED: Translation for Hebrew, Lithuanian, Indonesian and Catalan
  • ADDED: Make the project info configurable (#681)
  • CHANGED: Upgrading libraries to: DOMpurify 2.2.7, kjua 0.9.0 & random_compat 2.0.18
  • CHANGED: Open all links in new window (#630)
  • FIXED: PDF display in Firefox (#630)
  • FIXED: Allow pasting into password input dialog (#630)
  • FIXED: Display of expiration date in email (#630)
  • FIXED: Allow display of durations in weeks (#630)
  • FIXED: Avoid exposing burn-after-reading messages from cache (#630)
  • FIXED: Only display the dropzone when it should (#630)
  • FIXED: Detect delete token properly (#630)
  • FIXED: Sanitize output from Helper.urls2links() (#630)
  • FIXED: Avoid recreation of existing pasteurl element when calling URL shortener (#630)
  • FIXED: Downloads in Chrome >= 83 (#634)
  • FIXED: Display of empty files (#663)
  • FIXED: Improve OpenGraph attributes (#651)
  • FIXED: Reset to configured burn-after-reading, discussion and expiration settings (#682)
  • FIXED: Italic segment of project information (#756)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.5 release announcements.

This bug fix releases resolves further HTML entity encoding issues, the use of custom expiration options in the email function, pasting into the password dialog on pastes with attachments and also updates the identicon library to 2.0.0, which increases the minimum required PHP version to 5.6.

Benefits of switching to the new release

We recommend to upgrade 1.3.x instances to address these issues.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.3.3

  • CHANGED: Minimum required PHP version is 5.6, due to a change in the identicon library and to use php's native hash_equals()
  • CHANGED: Upgrading libraries to: identicon 2.0.0
  • FIXED: Support custom expiration options in email function (#586)
  • FIXED: Regression with encoding of HTML entities (#588)
  • FIXED: Unable to paste password on paste with attachment (#565 & #595)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.4 release announcements.

PrivateBin - Release v1.3.3 - Fixing HTML entity double encoding issues introduced in 1.3.2

Published by elrido over 4 years ago

This release fixes HTML entity double encoding issues introduced in version 1.3.2 of PrivateBin.

In the efforts to prevent the unencoded strings to cause XSS issues down the line in releases 1.3.2 and 1.2.2, we had some strings getting their HTML entities encoded twice. This caused some display glitches as well as preventing the URLs in paste texts to get converted to links.

This bug fix releases resolves these encoding issues, expands the XSS protection to the server side templating, updates some missing translation strings for the mailing feature (in 1.3.3 only) and also updates the DOMpurify library to 2.0.8.

Benefits of switching to the new release

We recommend to upgrade 1.3, 1.3.1, 1.3.2, 1.2, 1.2.1 and 1.2.2 instances to address these issues.

We do offer a backport of these fixes for the 1.2.x versions of PrivateBin. You may choose to use version 1.2.3 over 1.3.3, if you do need to support legacy browsers with incomplete or missing Webcrypto API, like IE, non-Chromium based Edge or some ESR releases.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.3.2

  • CHANGED: Upgrading libraries to: DOMpurify 2.0.8
  • CHANGED: Several translations got updated with missing messages
  • CHANGED: Introduce HTML entity encoding on server side (#581)
  • FIXED: HTML entity double encoding issues introduced in 1.3.2 (#560)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.3 & 1.2.3 release announcements.

PrivateBin - Release v1.2.3 - Fixing HTML entity double encoding issues introduced in 1.2.2

Published by elrido over 4 years ago

This release fixes HTML entity double encoding issues introduced in version 1.2.2 of PrivateBin.

In the efforts to prevent the unencoded strings to cause XSS issues down the line in releases 1.3.2 and 1.2.2, we had some strings getting their HTML entities encoded twice. This caused some display glitches as well as preventing the URLs in paste texts to get converted to links.

This bug fix releases resolves these encoding issues, expands the XSS protection to the server side templating and updates the DOMpurify library to 2.0.8.

Benefits of switching to the new release

We recommend to upgrade 1.2, 1.2.1 and 1.2.2 instances to address these issues.

We do offer a backport of these fixes for the 1.2.x versions of PrivateBin. You may choose to use version 1.2.3 over 1.3.3, if you do need to support legacy browsers with incomplete or missing Webcrypto API, like IE, non-Chromium based Edge or some ESR releases.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.2.2

  • CHANGED: Upgrading libraries to: DOMpurify 2.0.8
  • CHANGED: Introduce HTML entity encoding on server side (#581)
  • FIXED: HTML entity double encoding issues introduced in 1.3.2 (#560)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.3 & 1.2.3 release announcements.

This release fixes a persistent XSS vulnerability in filenames of attached files in PrivateBin.

On 25th of December 2019, an issue was discovered and fixed, which allowed the user provided attachment file name to inject HTML under certain conditions, leading to a persistent Cross-site scripting (XSS) vulnerability. This release includes an improved solution, which addresses the issue on a broader scope, avoiding this to reoccur in other areas of the code in the future.

Further details on this is an issue and its implications can be found in our report on the vulnerability. It also describes methods to check if your browser is currently affected by the issue. If it is, please consider updating your browser.

Benefits of switching to the new release

We recommend to upgrade 1.3, 1.3.1, 1.2 and 1.2.1 instances to address this issue, even if the instance doesn't have fileuploads enabled and uses the recommended CSP header to mitigate XSS attacks.

Due to the seriousness of the issue, we do offer a backport of the fix for the 1.2.1 version of PrivateBin, that also includes updated JavaScript libraries. You may choose to use that version over 1.3.2, if you do need to support legacy browsers with incomplete or missing Webcrypto API, like IE, non-Chromium based Edge or some ESR releases.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.3.1

  • ADDED: Translation for Ukrainian (#533)
  • ADDED: Option to send a mail with the link, when creating a paste (#398)
  • ADDED: Add support for CONFIG_PATH environment variable (#552)
  • CHANGED: Upgrading libraries to: base-x 3.0.7, DOMpurify 2.0.7 & Showdown 1.9.1
  • FIXED: HTML injection via unescaped attachment filename (#554)
  • FIXED: Password disabling option (#527)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.2 & 1.2.2 release announcements.

This release fixes a persistent XSS vulnerability in filenames of attached files in PrivateBin.

On 25th of December 2019, an issue was discovered and fixed, which allowed the user provided attachment file name to inject HTML under certain conditions, leading to a persistent Cross-site scripting (XSS) vulnerability. This release includes an improved solution, which addresses the issue on a broader scope, avoiding this to reoccur in other areas of the code in the future.

Further details on this is an issue and its implications can be found in our report on the vulnerability. It also describes methods to check if your browser is currently affected by the issue. If it is, please consider updating your browser.

Benefits of switching to the new release

We recommend to upgrade 1.3, 1.3.1, 1.2 and 1.2.1 instances to address this issue, even if the instance doesn't have fileuploads enabled and uses the recommended CSP header to mitigate XSS attacks.

Due to the seriousness of the issue, we do offer a backport of the fix for the 1.2.1 version of PrivateBin, that also includes updated JavaScript libraries. You may choose to use that version over 1.3.2, if you do need to support legacy browsers with incomplete or missing Webcrypto API, like IE, non-Chromium based Edge or some ESR releases.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Changes since version 1.2.1

  • CHANGED: Upgrading libraries to: bootstrap 3.4.1, DOMpurify 2.0.7, jQuery 3.4.1, kjua 0.6.0, Showdown 1.9.1 & SJCL 1.0.8
  • FIXED: HTML injection via unescaped attachment filename (#554)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.2 & 1.2.2 release announcements.

PrivateBin - Release v1.3.1 - Improve error messages for unsupported browsers

Published by elrido about 5 years ago

This release improves the display of appropriate errors for unsupported browsers/configurations.

Since the release of version 1.3 only two months ago we received reports on a surprising number of corner cases with certain browser versions and protocols in which the new release didn't work, while 1.2.1 still did. The release addresses most of these or at least aims to provide a meaningful error message with hints what the user may do to avoid these (switching to HTTPS, using a different browser or being limited to partial functionality).

We also have been provided with a Bulgarian translation and several improvements to the bootstrap template, cloning pastes and the drap & drop file upload. The URL shortener now also supports JSON APIs and the default size limit was increased to 10 MiB.

Before the 1.3 release we had tested mainly in Firefox and Chrome, but none of the core developers had easy access to Windows based browsers (Edge, IE) or Mac (Safari). We also missed that Chrome disables the webcrypto API used in 1.3 to replace the SJCL cryptographic library, when accessing the site via HTTP. It didn't do this in our local testing environments, as localhost is considered safe by it, even when not accessed via HTTPS. Other quirks discovered were issues when accessing PrivateBin via Tor and i2p networks. The Torbrowser disables webassembly due to security concerns, which prevented these clients to create or read pastes.

To facilitate testing of such quirks and having access to more browsers versions, we applied for a sponsored browserstack account. This helped us improving the browser feature detection. In particular the following cases got covered:

  • When a modern browser has webassembly disabled (i.e. for security), it displays a warning, but still can create and read uncompressed pastes, just not open compressed ones.
  • Browsers with a lack for webcrypto API on an HTTP site get suggested to switch to HTTPS (requires support by the server).
  • Browsers with a lack for webcrypto API, async or ES6 support get an error requesting to switch to a modern browser.
  • Internet Explorer remains unsupported, but now get an appropriate error requesting to switch to a modern browser.

Benefits of switching to the new release

We recommend to upgrade 1.3 instances to improve the support for Chrome and older browsers get more appropriate error messages.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

The default size limit got increased from 2 to 10 MiB. If you didn't configure a custom size, you may have to adjust your PHP and webserver settings to be able to use the new limit to the full extent.

If you use the MySQL database backend and don't allow the PrivateBin use to ALTER TABLES, you have to manually change one columns type and UPDATE the database version (replace "prefix_" with your own table prefix, if used):

ALTER TABLE prefix_paste MODIFY COLUMN data MEDIUMBLOB;
UPDATE prefix_config SET value = "1.3.1" WHERE id = "VERSION";

PostgreSQL and SQLite don't require this change.

Changes since version 1.3

  • ADDED: Translation for Bulgarian (#455)
  • CHANGED: Improved mobile UI - obscured send button and hard to click shortener button (#477)
  • CHANGED: Enhanced URL shortener integration (#479)
  • CHANGED: Improved file upload drag & drop UI (#317)
  • CHANGED: Increased default size limit from 2 to 10 MiB, switch data from BLOB to MEDIUMBLOB in MySQL (#458)
  • CHANGED: Upgrading libraries to: DOMpurify 2.0.1
  • FIXED: Enabling browsers without WASM to create pastes and read uncompressed ones (#454)
  • FIXED: Cloning related issues (#489, #491, #493, #494)
  • FIXED: Enable file operation only when editing (#497)
  • FIXED: Clicking 'New' on a previously submitted paste does not blank address bar (#354)
  • FIXED: Clear address bar when create new paste from existing paste (#479)
  • FIXED: Discussion section not hiding when new/clone paste is clicked on (#484)
  • FIXED: Showdown.js error when posting svg qrcode (#485)
  • FIXED: Failed to handle the case where user cancelled attachment selection properly (#487)
  • FIXED: Displaying the appropriate errors in older browsers (#508)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3.1 release announcements.

This release switches the used encryption and compression libraries and addresses several problems with mangled URLs and pastes.

We fixed several issues in this release. We now tell Chrome not to send the whole page, including the decrypted text, to it's translation services. Thanks to the use of blob instead of data URI's, Chrome can now deal with attachments larger then 2 MiB. The raw text mode escapes HTML correctly again (a regression introduced in 1.2). PrivateBin can now handle URLs mangled by Facebook.

Translations for Czech has been added since the last release.

We threat modeled the application in preparation for the changes in the API, JSON format and encryption.

The main change of this release was the switch from the SJCL and rawdeflate JavaScript libraries to the browser integrated WebCrypto API and zlib C library (via WebAssembly) as well as various modernizations of our use of JavaScript. We still fully support reading older pastes and comments, but newly generated pastes use a different, more efficient and flexible format. Some of these changes lead to us dropping the support for Internet Explorer and we suggest to use Edge instead, if no other modern browser is available (see Appendix A in the release announcements).

The change to WebCrypto API means that the cryptographic functions are now handled by the browser integrated libraries instead of code that has to be transferred from the webserver to the client. While this can't prevent a malicious party to inject logic to extract the key or decrypted contents, it does increase the trust users can have in the cryptographic functionality of PrivateBin as well as speed up both initial page load as well as the en/decryption itself.

Over the years we encountered several cases where the deflate implementation used in the rawdeflate JavaScript library produced results that couldn't be decompressed by itself or other deflate implementation. While the latter mainly affected third-party CLI clients, the first lead to pastes that couldn't be read even by PrivateBin itself. We had initially planned to use the pako JavaScript library, but during implementation of the new format found that the zlib C library used in most other languages for deflate support can be used in JavaScript as well, via compilation into WebAssembly. This is a very stable library with no currently known bugs and even performs better then pako.

Server operators now have an additional configuration option that lets them disable compression. While the compression before encryption reduces the size of most text, source code, markdown pastes and text comments drastically, when having file upload enabled and mostly using an instance to share already compressed files (office documents, PNG or JPG images, etc.) this slows down the creation of the pastes unnecessarily and without gain. Furthermore some security minded administrators may wish to disable compression to avoid potential security risks that would make brute forcing keys easier for shorter, compressed pastes.

As usual we have also upgraded all used libraries to their latest releases. The identicon library now requires PHP 5.5, so this is the new minimum required PHP version.

Finally the newly used JSON format and API was taken as an opportunity to implement some, otherwise breaking, changes like the use of base58 for the hash key encoding instead of base64, which addresses the Outlook mail client stripping trailing equal signs from URLs. The number of iterations in the PBKDF2 key derivation got increased from 10k to 100k to make it more costly to brute force the password of a paste. The server now uses Fowler–Noll–Vo checksums instead of md5 to generate unique paste IDs.

Benefits of switching to the new release

Due to some rather annoying bugs in the raw paste view and with URLs mangled by Facebook and Outlook, we do recommend an upgrade on instances that are more widely used. While most users never encountered cases where the pastes got mangled in the deflate compression, users that frequently upload office documents and certain source code and compiler outputs would trigger this rather reliably. There are also several improvements that increase the security of the encryption.

Update procedure

Two new configuration options, compression and httpwarning got introduced.

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root. Note that the latest docker containers use different user IDs then the older ones, so you will have to change the ownership of the attached data volume.

If you do have to use the new release on a PHP 5.4 environment, you can attempt to change the icon option to vizhash or none and decrease the MIN_PHP_VERSION in the lib/Controller.php file.

Changes since version 1.2.1

  • ADDED: Translation for Czech (#424)
  • ADDED: Threat modeled the application (#177)
  • ADDED: Made compression configurable (#38)
  • CHANGED: Minimum required PHP version is 5.5, due to a change in the identicon library
  • CHANGED: Minimum required browser versions are Firefox 54, Chrome 57, Opera 44, Safari 11, Edge 16, due to use of WebCrypto API, async/await, ES6 & WebAssembly features - all Internet Explorer versions are incompatible
  • CHANGED: JSON and encryption formats were changed to replace SJCL library by browser integrated WebCrypto API (#28, #74)
  • CHANGED: Replaced rawdeflate.js with zlib.wasm to resolve decompression failures and gain compatibility with standard deflate implementations (#193, #260, #328, #434, #440)
  • CHANGED: Increase PBKDF2 iterations to 100k (#350)
  • CHANGED: Replaced last use of MD5 with Fowler–Noll–Vo checksum which produces the exact length we need for the paste ID (#49)
  • CHANGED: Simplified some PHP code & renamed PrivateBin class into Controller, to make MVC pattern use more obvious (#342)
  • CHANGED: Upgrading libraries to: identicon 1.2.0, random_compat 2.0.18, jQuery 3.4.1, Showdown 1.9.0, DOMpurify 1.0.11 & kjua 0.6.0
  • FIXED: Prevent Chrome from sending content of paste to Google for translation (#378)
  • FIXED: To support attachments larger then 2 MiB in newer Chrome versions, we switched to blob instead of data URIs (#432)
  • FIXED: Since Outlook strips trailing equal signs in links, the key in URL hash is now base58 encoded, instead of base64 (#377)
  • FIXED: Facebooks started injecting parameters into shared URLs for tracking that lead to inaccessible pastes (#396)
  • FIXED: Properly escaped HTML in raw text mode (#358)
  • FIXED: Made download links better readable in the dark bootstrap theme (#364)
  • FIXED: Allow Letsencrypt bot to access on apache servers (#413)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.3 release announcements.

PrivateBin - Release v1.2.1 - Fix for low entropy key vulnerability in legacy browsers

Published by elrido about 6 years ago

This release fixes a low entropy key vulnerability in PrivateBin affecting legacy browsers

On 31st of July 2018, @cryptolok reported a cryptographic vulnerability in PrivateBin due to the incorrect use of SJCL when used on very old browsers. When creating a paste using any ZeroBin version or PrivateBin up to and including 1.1.1 on a browser without web crypto API support (Firefox<21, Chrome<15, Safari<5, IE<11) the key may have been generated without sufficient entropy. PrivateBin 1.2 was not affected, because the support for those browser versions got removed in the JS refactoring.

This release re-adds support for those legacy browsers and ensures they generate the key with sufficient entropy. In the next release of PrivateBin we will permanently drop legacy browser support and switch to the web crypto API exclusively. This release ensures that there is at least one release available that supports both legacy browsers and has the entropy issue fixed.

Further details on this is an issue and its implications can be found in our report on the vulnerability. It also describes methods to check if your browser is currently affected by the issue. If it is, please consider updating your browser.

Benefits of switching to the new release

If you are still using PrivateBin version 1.1.1 or ZeroBin, upgrading to this release will ensure that you retain legacy browser support and fix the low entropy key vulnerability in your current version. If you already upgraded to PrivateBin 1.2 and don't need to support these very old browser versions (released before October 2013) then you could consider skipping this release.

Update procedure

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root.

Note that this is the first release that is signed with the new signing key (fingerprint: 28CA 7C96 4938 EA5C 1481 D42A E11B 7950 E9E1 83DB). This key is intended to be used for signing releases from now on.

Changes since version 1.2

  • ADDED: Add support for mega.nz links in pastes and comments (#331)
  • CHANGED: Added some missing Russian translations (#348)
  • CHANGED: Minor PHP refactoring: Rename PrivateBin class to Controller, improved logic of some persistence classes (#342)
  • CHANGED: Upgrading DOMpurify library to 1.0.7
  • FIXED: Ensure legacy browsers without webcrypto support can't create paste keys with insufficient entropy (#346)
  • FIXED: Re-add support for old browsers (Firefox<21, Chrome<31, Safari<7, IE<11), broken in 1.2, will be removed again in 1.3
PrivateBin - Release v1.2 - QR codes, inline media display, 6 new languages & JS refactoring

Published by elrido about 6 years ago

This release adds QR code generation, inline display of video, audio, PDF and new translations to PrivateBin and a large refactoring of the JavaScript code.

A new button lets you generate a QR code of your newly created pastes URL. This allows for easy transfer of a pasted data from one mobile device to another.

When the optional file upload is enabled, uploaded videos, audio files and PDFs are displayed inline, like we did with images, as long as the visitors browser supports it. By default the file and paste upload is limited to a 2 MiB size.

Translations for Spanish, Occitan, Norwegian, Portuguese, Dutch and Hungarian have also been added since the last release.

The main change of this release, and the reason it took us so long since doing the last one, was the large refactoring and cleanup of the JavaScript logic of PrivateBin. The refactoring itself was done in early 2017. In parallel we introced mocha and JSverify running on nodeJS as a property based unit testing framework for the logic (à la QuickCheck). Many months were spent to cover more and more pieces of the logic.

In the end we covered all of the modular parts of the logic (879 of 1273 lines of code for a 69% code coverage), including the encryption wrapper functions for backward compatibility with older paste formats. The UI related parts of the code proved difficult to test, partly because in nodeJS the browsers document object model (DOM) is emulated using the JSdom library, the lack of an actual view port being present (so no scrolling, for example) and also due the event driven nature which contradicts the modular approach of unit testing. For many UI interfaces, large parts of the DOM has to be present, since emitting a single click event may trigger changes in many different parts of the UI. This is a shortcoming of the current structure of the UI logic, which we may need to improve further.

Still, the unit testing found many regressions and some issues that have been in the code for a long time without having been reported. It lays the necessary ground work for the future changes, especially the major changes planned for the encryption format.

Benefits of switching to the new release

Apart from the new QR code feature many new translations were added. All used libraries were upgraded, too. While no security issues were reported for any of these, they address some bugs that didn't affect us directly or improve compatibility with the latests browsers and PHP releases.

Update procedure

A new configuration option name was introduced for those admins that like to replace the "PrivateBin" moniker in the template with their own site name.

As usual, you can download the archive for a manual upgrade and can find more details in the installation instructions.

We now also offer a Docker container that includes the recommended secure setup with the non-essential files and data outside of the web servers document root. We also started providing additional tools in Docker containers.

Changes since version 1.1.1

  • ADDED: Translations for Spanish, Occitan, Norwegian, Portuguese, Dutch and Hungarian
  • ADDED: Option in configuration to change the default "PrivateBin" title of the site
  • ADDED: Added display of video, audio & PDF, drag & drop, preview of attachments (#182)
  • ADDED: QR code generation (#169)
  • ADDED: Introduced DOMpurify library to sanitize generated HTML before display (#183)
  • CHANGED: Force JSON request for getting paste data & password retry (#216)
  • CHANGED: Minimum required PHP version is 5.4 (#186)
  • CHANGED: Shipped .htaccess files were updated for Apache 2.4 (#192)
  • CHANGED: Cleanup of bootstrap template variants and moved icons to img directory
  • CHANGED: Removed option to hide clone button on expiring pastes, since this requires reading the paste for rendering the template, which leaks information on the pastes state
  • CHANGED: Upgrading libraries to: SJCL 1.0.7, jQuery 3.3.1, Base64 2.4.5, Showdown 1.8.6, DOMpurify 1.0.5 & Prettify 453bd5f
  • CHANGED: Refactored JavaScript code, making it modular with private and public functions, making it much easier to maintain (#178)
  • FIXED: To counteract regressions introduced by the refactoring, we finally introduced property based unit testing for the JavaScript code, this caught several regressions, but also some very old bugs not found so far (#32)

More details about the plans for future releases and on how you can help the project achieve them, can be found in the PrivateBin version 1.2 release announcements.

PrivateBin - Release v1.1.1 - Fix for data leak vulnerability

Published by elrido about 7 years ago

This release fixes leakage of configuration and raw pastes that can occur in some setups.

On 29th of September, @pstn reported a medium data leak vulnerability in PrivateBin. If either a) a non-apache webserver is used or b) apache has "AllowOverride" disabled and the installation was not secured by changing the path of sensitive folders, these can be accessed from the outside. This release fixes this by converting these files from INI/JSON to php files, so that they are protected even under those conditions.

Further details on why this is an issue and its implications can be found in our report on the vulnerability. It also describes methods to check if your server is currently affected by the issue.

Benefits of switching to the new release

Even if you are currently using an apache server and are not affected by this issue, we would advise to plan to update soon. Some of the sites affected by this reported that they had changed their webserver setup, inadvertedly becoming affected. You might do the same in the future, too, and forget to check your PrivateBin setups security.

Alternatively consider to securing your installation by changing the path of folders containing sensitive information. We have updated our installation instructions, stressing our security recommendations.

Update procedure

Apart from updating the libraries and the javascript files, make sure that your PHP process can also write to the cfg folder. The next call to your privatebin installation will convert the conf.ini file into conf.php. Accessing pastes will convert these, too. Additionally we also are hooking into the purge mechanism to gradually convert pastes that are not frequently accessed.

Note: @rugk has updated his expired pgp key. The fingerprint stayed the same, but you may need to update it.

Changes since version 1.1

  • CHANGED: Switched to .php file extension for configuration and data files, to avoid leaking data in unprotected installations.
PrivateBin - Release v1.1 - PrivateBin in Italian and Russian

Published by elrido almost 8 years ago

This release adds Italian and Russian translations to PrivateBin and fixes an XSS and a database issue.

Fortunately the CSP headers introduced in version 1.0 suppressed the XSS issue in modern browsers. But older browsers would still be affected when clicking on the "Raw text" button of a markdown formatted paste containing JavaScript. The issue was introduced with the change in version 1.0 that displays markdown code instead of the rendered HTML in the "raw" mode.

The other fixed issue concerns the automatic purging of outdated pastes, which was introduced in version 1.0. When using the database model instead of the default file based store, pastes set to "never" expire were always purged, too.

Benefits of switching to the new release

If you are using the database model instead of the filesystem one and offer pastes that "never" expire, then you should upgrade or disable the purge by setting the batchsize to 0 in your configuration.

Apart from fixing the XSS issue, markdown pastes containing HTML code will now be properly displayed in the "raw" mode.

Both of these issues affected only version 1.0. There are of course many more benefits in switching to this release, if you are still using a version of PrivateBin or ZeroBin before 1.0.

Update procedure

When updating please make sure to adjust the cspheader setting. We recommend you to either comment the setting out in order to use our default recommend CSP header or adjust the header so it matches the new default one (mainly just add the referrer no-referrer; part).

Changes since version 1.0

  • ADDED: Translations for Italian and Russian
  • ADDED: Loading message displayed until decryption succeeded for slower (in terms of CPU or network) systems
  • ADDED: Dockerfile for docker container creation
  • CHANGED: Using modal dialog to request password input instead of native JS input window (#69)
  • CHANGED: Suppressed referrer HTTP header sending when following links in a paste or comment (#96) and added additional HTTP headers for XSS mitigation (#91)
  • CHANGED: Updated random_compat and jQuery libraries
  • FIXED: XSS using JavaScript stored as markdown formatted paste, after clicking on Raw paste button (related to #137)
  • FIXED: Automatic purging deleting non-expiring pastes, when using database store (#149)

We wish you a happy new year!

PrivateBin - Release v1.0 - The ZeroBin fork is now called PrivateBin

Published by rugk about 8 years ago

This is the first release of PrivateBin after renaming the ZeroBin fork. We decided to use the version number 1.0 for this release as we consider PrivateBin now very mature and feature complete. We recommend everyone to update as this version features many security improvements.

The renaming of ZeroBin to PrivateBin is done to highlight the huge developments (over 500 commits) which have happened since ZeroBin stopped being actively maintained by its original creator Sébastien Sauvage in 2014. By choosing to release version 1.0 we also want to emphasize the many feature changes - according to semantic versioning - and want to show that PrivateBin is now considered mature. Hence a version number smaller than 1.0 just does not seem suitable for PrivateBin anymore.

Update procedure

Make sure your system has some source for cryptographically safe random numbers! Either use PHP 7 or one of the supported fallbacks: libsodium, open_basedir access to /dev/urandom, mcrypt or com_dotnet. The previous workaround using mt_rand() was removed, as it leads to unsafe and predictable numbers.

Otherwise, as usual, only the files need to be updated. The tmp folder for the compiled RainTPL templates can be removed, since we switched to a more lightweight template approach due to RainTPL not being maintained anymore. Have a look at or template documentation to learn how to upgrade your custom template to the new system.

There are some new options in the configuration file. If you are updating from an older ZeroBin install and want to keep existing pastes accessible, make sure to enable the option zerobincompatibility. Otherwise more secure settings are used which break compatibility with ZeroBin.

Benefits of switching to the new release

As a user of a ZeroBin instance nothing changes. As soon as the server administrator upgrades to PrivateBin, you can continue using it. We took great efforts to ensure that existing pastes are still fully compatible with the current release.

Since version 0.22 we added a Slowene and Chinese translation, an (optional) URL shortener button, a preview tab to help you chose the right format for your content and many other small user interface improvements to make your life a bit more comfortable.

With this release we have improved the security of PrivateBin as we have now addressed most concerns raised in a security audit of the original ZeroBin in 2014.

Furthermore we switched to AES Galois/Counter mode, which is considered a stronger encryption mode then the previously used AES Counter mode with CBC-MAC authentication. The main benefit here is that the authentication (as the pastes/comments are sent over network you want to ensure that your content is not accidentally or maliciously manipulated) is done on the encrypted text instead of the plain text. The potential parallelization of CCM could not be implemented in the single threaded Javascript environment of webbrowsers, anyway.

We also make use of a new browser security feature called Content Security Policy, which prevents XSS attacks in an effective way. It blocks any third party scripts and resources to be executed in the context of the application.

Additionally we started using the new subresource integrity (SRI) browser feature to avoid loading manipulated scripts under man-in-the-middle attacks. Additionally this allows privacy aware users to easily check for manipulated scripts in the source code of the website and to compare them to the hashes of the official PrivateBin release of that version.

To ensure that PrivateBins code is of high quality we added various code quality checkers and subsequently improved the code. These analysers also helped us to find some potential vulnerabilities.

If you have further questions or issues have a look at the new FAQ.

Changes since version 0.22

  • ADDED: Translations for Slowene and Chinese
  • ADDED: re-introduced (optional) URL shortener support, which was removed back in version 0.16 for privacy concerns
  • ADDED: Preview tab, helpful for writing markdown code or check the source code rendering
  • ADDED: Automatic purging of expired pastes, done on paste creation
  • ADDED: Option to disable icons in discussions (will only affect newly created pastes)
  • ADDED: Composer support
  • CHANGED: Renamed the ZeroBin fork to PrivateBin
  • CHANGED: Removed unmaintained RainTPL template engine, replacing the templates with straight forward PHP files
  • CHANGED: New logo and favicons
  • CHANGED: Upgrading SJCL library to 1.0.4
  • CHANGED: Switched to GCM instead of CCM mode for AES encryption for newly created pastes
  • CHANGED: Use backported random bytes function from PHP7 for older PHP versions instead of mcrypt
  • CHANGED: Switched to a SHA256 HMAC of the IP in traffic limiter instead of storing it in plain text on the server
  • CHANGED: Introduced content security policy header to reduce cross site scripting (XSS) risks
  • CHANGED: Added SHA512 subresource integrity hashes for all javascript includes to reduce the risk of manipulated scripts and easier detection of such
  • CHANGED: Refactored PHP code to conform to PSR-4 and PSR-2 standards
  • CHANGED: Switched to Identicons as the default for comments with nicknames
  • CHANGED: Vizhash is now optional and based on (128 byte) SHA512 HMAC instead of (144 byte) combination of MD5, SHA1 and a reversal of that string
  • FIXED: Content-type negociation for HTML in certain uncommon browser configurations
  • FIXED: JavaScript error displayed before page is loaded or during attachment load
  • FIXED: Don't strip space characters at beginning or end of optional password
  • FIXED: Various UI glitches in mobile version or on smaller desktops with language menu, button spacing and long URLs
  • FIXED: Back button now works as expected after switching to raw text view of a paste
  • FIXED: Reactivated second error message above send comment button to ensure its visibility when the main error message is outside the viewport
  • FIXED: Raw text now displays original markdown instead of rendered HTML
  • FIXED: Removed unused code detected with the help of various code review tools
  • FIXED: Table format for PostgreSQL, making it possible to use PostgreSQL as backend in addition to MySQL, SQLite and flat files

We hope you will enjoy the new PrivateBin!

PrivateBin - Release 0.22

Published by elrido over 8 years ago

  • ADDED: Tab character input support
  • ADDED: Dark bootstrap theme
  • ADDED: Option to hide clone button on expiring pastes
  • ADDED: Option to set a different default language then English and/or enforce it as the only language
  • ADDED: Database now contains version to allow automatic update of structure, only if necessary; removing database structure check on each request
  • ADDED: Favicons
  • FIXING: Regressions in database layer, prohibiting pastes from being stored
  • FIXING: Fixing "missing" comments when they were posted during the same second to the same paste
  • FIXING: JS failing when password input disabled
  • CHANGED: Switching positions of "New" and "Send" button, highlighting the latter to improve workflow
  • CHANGED: Renamed config file to make updates easier
  • CHANGED: Switching to JSON-based REST-API
  • CHANGED: Database structure to store attachments, allowing larger attachments to be stored (depending on maximum BLOB size of database backend)
  • CHANGED: Refactored data model, traffic limiting & request handling
PrivateBin - Release 0.21.1

Published by elrido over 8 years ago

This minor release addresses an issue with the database store in version 0.21. If you use the database model please consider updating.

  • FIXING: lost meta data when using DB model instead of flat files
  • FIXING: mobile navbar getting triggered on load
  • CHANGED: database table "paste" gets automatically extended with a "meta" column
  • CHANGED: navbar of "bootstrap" template now spans full width of view port on large screens