René's URL Explorer Experiment


Title: Python : Add query to detect PAM authorization bypass · Pull Request #8595 · github/codeql · GitHub

Open Graph Title: Python : Add query to detect PAM authorization bypass · Pull Request #8595 · github/codeql

X Title: Python : Add query to detect PAM authorization bypass · Pull Request #8595 · github/codeql

Description: Using only a call to pam_authenticate to check the validity of a login can lead to authorization bypass vulnerabilities. A pam_authenticate only verifies the credentials of a user. It does not check if a user has an appropriate authorization to actually login. This means a user with a expired login or a password can still access the system. This PR includes a qhelp describing the issue, a query which detects instances where a call to pam_acc_mgmt does not follow a call to pam_authenticate and it's corresponding tests. Some of the public CVE's I can find using this query are : CVE-2022-0860 found in cobbler/cobbler fredhutch/motuz

Open Graph Description: Using only a call to pam_authenticate to check the validity of a login can lead to authorization bypass vulnerabilities. A pam_authenticate only verifies the credentials of a user. It does not chec...

X Description: Using only a call to pam_authenticate to check the validity of a login can lead to authorization bypass vulnerabilities. A pam_authenticate only verifies the credentials of a user. It does not chec...

Opengraph URL: https://github.com/github/codeql/pull/8595

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2a958324-2e83-8247-bc16-2b7c6033ad28
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEC3E:1ED2:ABBAF8:FCD390:6A4CCB85
html-safe-nonce5ad14f76e731248413491e88f8f936a369030eb2c4752041534d8e527f074473
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzNFOjFFRDI6QUJCQUY4OkZDRDM5MDo2QTRDQ0I4NSIsInZpc2l0b3JfaWQiOiI1MDc3NDk1OTgxMDM4OTQ3MjA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac814ceaeb16fb663c04248a607f38cfd93b48b4e7e00ebd7e6c26fd36228a860e
hovercard-subject-tagpull_request:893435629
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/8595/files
twitter:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
og:image:altUsing only a call to pam_authenticate to check the validity of a login can lead to authorization bypass vulnerabilities. A pam_authenticate only verifies the credentials of a user. It does not chec...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneee8a9d18044a05fe2d57b9ae797da38c8be34effb03f015f7c42e94770d28a1b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef84814acc6f036583fd43463f5847a846243d2a4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/8595/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F8595%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F8595%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/8595/files
Reloadhttps://github.com/github/codeql/pull/8595/files
Reloadhttps://github.com/github/codeql/pull/8595/files
Please reload this pagehttps://github.com/github/codeql/pull/8595/files
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 2k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.8k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 987 https://github.com/github/codeql/issues
Pull requests 424 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality 0 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Code https://github.com/github/codeql
Issues https://github.com/github/codeql/issues
Pull requests https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
RasmusWLhttps://github.com/RasmusWL
github:mainhttps://github.com/github/codeql/tree/main
Conversation 17 https://github.com/github/codeql/pull/8595
Findings https://github.com/github/codeql/pull/8595/findings
Commits 5 https://github.com/github/codeql/pull/8595/commits
Checks 0 https://github.com/github/codeql/pull/8595/checks
Files changed https://github.com/github/codeql/pull/8595/files
Please reload this pagehttps://github.com/github/codeql/pull/8595/files
Python : Add query to detect PAM authorization bypass https://github.com/github/codeql/pull/8595/files#top
Show all changes 5 commits https://github.com/github/codeql/pull/8595/files
9203304 Python : Add query to detect PAM authorization bypass Mar 29, 2022 https://github.com/github/codeql/pull/8595/commits/92033047a51018285b081cba1d234b704078d9e3
785dc1a Include changes from review Apr 12, 2022 https://github.com/github/codeql/pull/8595/commits/785dc1af3c49140a7b4e9ad936ecc80d037b0335
6235dc5 Python: Handle `find_library` assignment to temp variable RasmusWL Apr 13, 2022 https://github.com/github/codeql/pull/8595/commits/6235dc503965deafd3f30ff76e3c7fcd2d5fceb6
ab1252d Python: Add @precision high for `py/pam-auth-bypass` RasmusWL May 9, 2022 https://github.com/github/codeql/pull/8595/commits/ab1252d1967b3a85d0b692241b53990bb12ce55f
c218162 Merge branch 'main' into pypam RasmusWL May 9, 2022 https://github.com/github/codeql/pull/8595/commits/c218162104c380da15c903df370917089c7041a4
Clear filters https://github.com/github/codeql/pull/8595/files
Please reload this pagehttps://github.com/github/codeql/pull/8595/files
Please reload this pagehttps://github.com/github/codeql/pull/8595/files
PamAuthorization.qhelp https://github.com/github/codeql/pull/8595/files#diff-2707f1c8cc0f5cd51116804b83d3bf70df2e7af251c25146c1d414b469bb7cff
PamAuthorization.ql https://github.com/github/codeql/pull/8595/files#diff-7189c31a0b3c9b4c8f59a1cbca4fe179a5b8d86c54f32b4d7a1d7bd4261b5de9
PamAuthorizationBad.py https://github.com/github/codeql/pull/8595/files#diff-fb982f69b73ca697431375554ed951f4dc568913a027a021a83d4cd6635e27a9
PamAuthorizationGood.py https://github.com/github/codeql/pull/8595/files#diff-c4c706eb9ff33fdf3e6997c4231f0a721813994b0e51aed1849546d96582911b
PamAuthorization.expected https://github.com/github/codeql/pull/8595/files#diff-a0102e69eee9c42924a3a9f542b05e09e691be41d11f7ae0612e131da780f0a5
PamAuthorization.qlref https://github.com/github/codeql/pull/8595/files#diff-ecafb6678da830b8b74b4c479ee0c0dccd1e6f8a0d35852d1db1f497f350bcba
pam_test.py https://github.com/github/codeql/pull/8595/files#diff-49bb97851d52822aa4369832be7aff8fa54d21b3db662dc016b495d9580caa9f
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/src/experimental/Security/CWE-285/PamAuthorization.qhelphttps://github.com/github/codeql/pull/8595/files#diff-2707f1c8cc0f5cd51116804b83d3bf70df2e7af251c25146c1d414b469bb7cff
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/src/experimental/Security/CWE-285/PamAuthorization.qhelp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/src/experimental/Security/CWE-285/PamAuthorization.qlhttps://github.com/github/codeql/pull/8595/files#diff-7189c31a0b3c9b4c8f59a1cbca4fe179a5b8d86c54f32b4d7a1d7bd4261b5de9
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/src/experimental/Security/CWE-285/PamAuthorization.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/src/experimental/Security/CWE-285/PamAuthorizationBad.pyhttps://github.com/github/codeql/pull/8595/files#diff-fb982f69b73ca697431375554ed951f4dc568913a027a021a83d4cd6635e27a9
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/src/experimental/Security/CWE-285/PamAuthorizationBad.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/src/experimental/Security/CWE-285/PamAuthorizationGood.pyhttps://github.com/github/codeql/pull/8595/files#diff-c4c706eb9ff33fdf3e6997c4231f0a721813994b0e51aed1849546d96582911b
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/src/experimental/Security/CWE-285/PamAuthorizationGood.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/test/experimental/query-tests/Security/CWE-285/PamAuthorization.expectedhttps://github.com/github/codeql/pull/8595/files#diff-a0102e69eee9c42924a3a9f542b05e09e691be41d11f7ae0612e131da780f0a5
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/test/experimental/query-tests/Security/CWE-285/PamAuthorization.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/test/experimental/query-tests/Security/CWE-285/PamAuthorization.qlrefhttps://github.com/github/codeql/pull/8595/files#diff-ecafb6678da830b8b74b4c479ee0c0dccd1e6f8a0d35852d1db1f497f350bcba
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/test/experimental/query-tests/Security/CWE-285/PamAuthorization.qlref
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/test/experimental/query-tests/Security/CWE-285/pam_test.pyhttps://github.com/github/codeql/pull/8595/files#diff-49bb97851d52822aa4369832be7aff8fa54d21b3db662dc016b495d9580caa9f
View file https://github.com/github/codeql/blob/c218162104c380da15c903df370917089c7041a4/python/ql/test/experimental/query-tests/Security/CWE-285/pam_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/8595/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.