# web2py remote code execution via hardcoded encryption key in session.connect function

Advisory record · `GHSA-q2rq-qgcf-m22w`

- **Identifiers:** `GHSA-q2rq-qgcf-m22w` · `CVE-2016-3953` · `PYSEC-2026-570`
- **State:** Confirmed
- **Severity:** CVSS 9.8 Critical
- **Critical:** Yes: CVSS 9+
- **Published:** 29 Jun 2026
- **Updated:** 1 Jul 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 29 Jun 2026, 11:50 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Critical

Critical, because:

- CVSS score 9.8: 9.0 or more.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected packages

- `web2py` (PyPI): affected `<2.14.2`; fixed in `2.14.2`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> web2py versions before 2.14.2 are affected. The sample web application may allow a remote attacker to execute arbitrary code by exploiting a hardcoded encryption key used when calling the session.connect function. The source gives few details about the exact attack path. Upgrade web2py to version 2.14.2 or later.

Written 10 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 9.8 Critical, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`, from OSV

- **CISA KEV:** Not listed.
- **EPSS:** 0.033, the 88th percentile, on 17 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the GitHub Advisory Database, published 29 Jun 2026. New records show when each source confirmed them.

## Sources

- [GitHub Advisory Database: GHSA-q2rq-qgcf-m22w](https://github.com/advisories/GHSA-q2rq-qgcf-m22w)
- [OSV: GHSA-q2rq-qgcf-m22w](https://osv.dev/vulnerability/GHSA-q2rq-qgcf-m22w)
- <https://nvd.nist.gov/vuln/detail/CVE-2016-3953>
- <https://github.com/web2py/web2py/issues/1205>
- <https://github.com/web2py/web2py/commit/9706d125b42481178d2b423de245f5d2faadbf40>
- <https://devco.re/blog/2017/01/03/web2py-unserialize-code-execution-CVE-2016-3957>
- <https://github.com/web2py/web2py>
- <https://github.com/web2py/web2py/blob/R-2.14.1/applications/examples/models/session.py>
- <https://usn.ubuntu.com/4030-1>
- <https://pypi.org/project/web2py>
- <https://github.com/advisories/GHSA-q2rq-qgcf-m22w>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-q2rq-qgcf-m22w>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-q2rq-qgcf-m22w/>. Everything for agents: <https://agentprime.io/llms.txt>.
